Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 343657 - tool to remove not needed patches from FILESDIR
Summary: tool to remove not needed patches from FILESDIR
Status: RESOLVED DUPLICATE of bug 292847
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-01 09:25 UTC by Justin Lecher (RETIRED)
Modified: 2018-02-04 13:07 UTC (History)
3 users (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 Justin Lecher (RETIRED) gentoo-dev 2010-11-01 09:25:52 UTC
To keep the tree slim it would be nice to have a tool/repoman check to clean FILESDR for uneeded patches.
Comment 1 Tomáš Chvátal (RETIRED) gentoo-dev 2010-11-01 22:50:25 UTC
This is basicaly cantfix,
with current architecture it is almost imposible to do what you want,
at best efforts you can write faluty tool that will have lot of false positives.

For more info how to do it talk with Christian (idl0r).
Comment 2 Zac Medico gentoo-dev 2010-11-02 00:01:14 UTC
We'd need an EAPI extension which allows ebuilds to specify which files they consume in $FILESDIR, similar to SRC_URI.
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2010-11-02 07:22:07 UTC
Then it will be a future request. But there are many dead files in FILESDIR.
Comment 4 Fabian Groffen gentoo-dev 2010-11-02 07:29:30 UTC
(In reply to comment #1)
> This is basicaly cantfix,
> with current architecture it is almost imposible to do what you want,
> at best efforts you can write faluty tool that will have lot of false
> positives.

You'll always have false positives (bad!), but you can write something that does a good job for approx. 99% of the cases.  I know, because I had to deal with the inverse problem of fetching files the ebuild needs.  It basically breaks on people doing advanced bash (looping) tricks (mpfr) or with local variables (lua).
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-11-02 07:33:01 UTC
(In reply to comment #2)
> We'd need an EAPI extension which allows ebuilds to specify which files they
> consume in $FILESDIR, similar to SRC_URI.

And you expect the devs to write an another, ineffective file list in ebuilds?
Comment 6 Zac Medico gentoo-dev 2010-11-02 16:10:59 UTC
(In reply to comment #5)
> (In reply to comment #2)
> > We'd need an EAPI extension which allows ebuilds to specify which files they
> > consume in $FILESDIR, similar to SRC_URI.
> 
> And you expect the devs to write an another, ineffective file list in ebuilds?

Shrug, I guess there are other was to accomplish it. Maybe it's easier if we have the variable refer to subdirectories inside FILESDIR, so the that all the files don't have to be explicitly listed in the ebuild.
Comment 7 Justin Lecher (RETIRED) gentoo-dev 2010-11-03 07:05:53 UTC
> Shrug, I guess there are other was to accomplish it. Maybe it's easier if we
> have the variable refer to subdirectories inside FILESDIR, so the that all the
> files don't have to be explicitly listed in the ebuild.
> 

That would work either as patch A for version x could also apply on version x+1 and reused in the x+1 ebuild. Only solution with subdirs would be a big duplication of patches.
Comment 8 Zac Medico gentoo-dev 2010-11-03 07:45:14 UTC
(In reply to comment #7)
> That would work either as patch A for version x could also apply on version x+1
> and reused in the x+1 ebuild. Only solution with subdirs would be a big
> duplication of patches.

You could allow each ebuild do specify multiple directories, and some of those directories could be shared between multiple ebuilds in order to avoid any duplication. For example, you could have MY_FILES="common $PV" to indicate that an ebuild consumes files from both the "common" and "$PV" subdirectories.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-11-03 15:11:43 UTC
But do we really need this? I guess that if we start enforcing all those requirements, the effort needed to get it all working would be much larger than one required for a particular dev to check his/her files manually when mangling a package.

Moreover, I guess many devs will simply not waste their time declaring new variables. Especially if they right now don't even think about checking their files/ subdirs.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-02-04 13:07:41 UTC

*** This bug has been marked as a duplicate of bug 292847 ***