Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 431196 - dev-util/pkgcheck: complain about missing patches
Summary: dev-util/pkgcheck: complain about missing patches
Status: UNCONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PkgCore (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PkgCore project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-13 09:42 UTC by Dirkjan Ochtman (RETIRED)
Modified: 2022-10-15 01:17 UTC (History)
8 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 Dirkjan Ochtman (RETIRED) gentoo-dev 2012-08-13 09:42:22 UTC
See bug 430288.
Comment 1 Zac Medico gentoo-dev 2012-08-13 20:02:49 UTC
So, we'd use a regular expression to identify epatch calls. Then we'd expand variables like ${FILESDIR} and ${PV} in the arguments, and try to resolve them to files. If the calls use relative paths that rely on the current working directory, would we just ignore them?
Comment 2 Fabian Groffen gentoo-dev 2012-08-13 20:06:47 UTC
it's IMO extremely hard to do this

I wrote an implementation a long time ago for Prefix, but with a lot of evals, and more (to support full bash syntax of expansions), it's still missing some cases due to variables being set, loops being used, etc.  (example: mpfr)
Comment 3 Ryan Hill (RETIRED) gentoo-dev 2012-08-14 03:43:45 UTC
I was thinking about this after making the comment on the referenced bug, and I agree it would be extremely hard to implement.  In that particular case a direct string match would have caught it since there were no variables other than "${FILESDIR}" in use.  But even that would be tricky to pull off without evaluating the string to be sure there's no variable or command substitution taking place.  You'd end up with a very complicated check that would catch a small subset of patches.
Comment 4 Hanno Böck gentoo-dev 2019-09-08 10:29:27 UTC
I fell over this (committing an ebuild with a missing patch) a few days ago and already wanted to open a feature request, just to find out there already is this one.

I wonder if we should review this, because in the meantime things got easier. Most ebuilds don't use epatch any more, they use the PATCHES variable. It shouldn't be too hard to parse PATCHES and check if all referenced patches in FILESDIR are actually there and committed.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-12 03:18:26 UTC
repoman support has been removed per bug 835013.

Please file a new bug (or, I suppose, reopen this one) if you feel this check is still applicable to pkgcheck and doesn't already exist.