Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys-fs/cryfs: Fixed inapplicable warning message #4772

Closed
wants to merge 2 commits into from

Conversation

automorphism88
Copy link
Contributor

The Gentoo cmake-utils eclass defines NDEBUG, which makes a warning message appear on the help screen saying "WARNING! This is a debug build. Performance might be slow." which is inaccurate since a build log confirms that the proper CXXFLAGS are applied. Added a line to src_prepare() that removes this message with sed.

Also added ~x86 to KEYWORDS since I tested it in a chroot.

@gentoo-repo-qa-bot gentoo-repo-qa-bot added self-maintained The PR changes only packages that are maintained by the submitter (i.e. no need to ask anybody else) assigned PR successfully assigned to the package maintainer(s). labels May 26, 2017
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull Request assignment

Areas affected: ebuilds
Packages affected: sys-fs/cryfs

sys-fs/cryfs: @automorphism88, @gentoo/proxy-maint

@mgorny mgorny self-assigned this May 27, 2017
@@ -40,6 +40,9 @@ src_prepare() {
# remove tests that require internet access to comply with Gentoo policy
sed -i -e '/CurlHttpClientTest.cpp/d' -e '/FakeHttpClientTest.cpp/d' test/cpp-utils/CMakeLists.txt || die

# remove non-applicable warning caused by cmake-utils setting NDEBUG
sed -i -e '/WARNING! This is a debug build. Performance might be slow./d' src/cryfs-cli/Cli.cpp || die
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like upstream is doing something really silly. Did you submit a bug and/or a patch removing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume upstream is counting on the user following their build instructions (or using their precompiled Ubuntu binaries), in which case this warning doesn't appear because CMAKE_BUILD_TYPE=Release results in -O3 -NDEBUG being used. I haven't submitted a bug or patch but I'm assuming it'd be blamed on the Gentoo build replacing their flags. Given this is the only place in the code where NDEBUG is checked for I'm not sure it really matters.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I suppose that's the case. However, if they want to account for specific CMAKE_BUILD_TYPE, they should really verify CMAKE_BUILD_TYPE rather than the side effects of it.

@@ -40,6 +40,9 @@ src_prepare() {
# remove tests that require internet access to comply with Gentoo policy
sed -i -e '/CurlHttpClientTest.cpp/d' -e '/FakeHttpClientTest.cpp/d' test/cpp-utils/CMakeLists.txt || die

# remove non-applicable warning caused by cmake-utils setting NDEBUG
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Err, but the warning is conditional to NDEBUG not being set? I'll remove that explanation because the removal itself makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sorry, it's an #ifndef in the .cpp file in question. I grepped the complete source tree and this line is the only place NDEBUG is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s). self-maintained The PR changes only packages that are maintained by the submitter (i.e. no need to ask anybody else)
Projects
None yet
3 participants