Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 651678 - Enable FEATURES strict-keepdir by default
Summary: Enable FEATURES strict-keepdir by default
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 683434
  Show dependency tree
 
Reported: 2018-03-27 08:49 UTC by Pacho Ramos
Modified: 2019-06-23 18:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2018-03-27 08:49:26 UTC
From time to time I get one of that QA bugs warning me about a package installing empty directories that in most of the cases are useless or should be created by tmpfiles.d stuff.

I was wondering why portage couldn't simply not install that empty dirs and remove them. Then, I realized that the option was already present but disabled by default:
              strict-keepdir
                     Have portage strictly require keepdir calls in ebuilds.  Empty directories installed without explicit keepdir will be removed.


I guess you keep it disabled by default as switching it could cause breakage in some packages that are relying on that empty dirs in some way but, couldn't it be enabled taking advantage of future eapi7 bumps?

The idea would be to remove that dirs in eapi7 allowing developers to catch the issue in their packages as soon as they try to use new EAPI, while keeping current packages "working" (I guess "midworking" as they rely on something that supposedly shouldn't be installed... but at least not breaking in new ways)

Thanks
Comment 1 Zac Medico gentoo-dev 2018-03-27 08:58:46 UTC
Yeah EAPI 7 sounds good.
Comment 2 Pacho Ramos gentoo-dev 2018-07-12 13:21:46 UTC
Maybe it is too late because EAPI7 was already deployed... but maybe we are still in time to switch this instead of needing to wait for EAPI8 :/
Comment 3 Michael Orlitzky gentoo-dev 2019-04-27 12:03:13 UTC
This is partially dealt with in recent versions of portage. With USE=gentoo-dev, we set FEATURES=strict-keepdir by default.

But, it may be OK to enable it for everyone now. The strict-keepdir doesn't kill the ebuild but instead just deletes the directories, causing runtime failures. Waiting for a new EAPI is only beneficial if you think developers are going to do a thorough runtime test of the package because of a new EAPI. And maybe I'm cynical, but I wouldn't count on that.

Worst case, we emergency revbump some old unmaintained packages to change dodir into keepdir.
Comment 5 Larry the Git Cow gentoo-dev 2019-04-30 02:57:10 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=227c1e8bcb5a6fc377be46dbac33ef9a3dcaa27d

commit 227c1e8bcb5a6fc377be46dbac33ef9a3dcaa27d
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-04-30 02:53:01 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-04-30 02:55:00 +0000

    sys-apps/portage: version bump to 2.3.66
    
     #175612 download distfiles to temp file and rename atomically
     #651678 enable FEATURES=strict-keepdir behavior for new EAPIs
    
    Bug: https://bugs.gentoo.org/683434
    Bug: https://bugs.gentoo.org/175612
    Bug: https://bugs.gentoo.org/651678
    Package-Manager: Portage-2.3.66, Repoman-2.3.12
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-2.3.66.ebuild | 259 +++++++++++++++++++++++++++++++++
 2 files changed, 260 insertions(+)
Comment 6 Larry the Git Cow gentoo-dev 2019-04-30 02:57:44 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=bfda0d2bd4ba03a4e77f488ec3fd4f9c6c351662

commit bfda0d2bd4ba03a4e77f488ec3fd4f9c6c351662
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-04-27 18:11:11 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-04-30 02:40:10 +0000

    Enable FEATURES=strict-keepdir behavior for new EAPIs
    
    Suggested-by: Pacho Ramos <pacho@gentoo.org>
    Bug: https://bugs.gentoo.org/651678
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 bin/eapi.sh                         | 4 ++++
 bin/install-qa-check.d/95empty-dirs | 4 +++-
 man/make.conf.5                     | 1 +
 3 files changed, 8 insertions(+), 1 deletion(-)