Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 533036 - >=sys-apps/portage-2.2.8 builds binary packages with FEATURES="unmerge-backup" despite --buildpkg-exclude
Summary: >=sys-apps/portage-2.2.8 builds binary packages with FEATURES="unmerge-backup...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 484436
  Show dependency tree
 
Reported: 2014-12-19 15:50 UTC by Adam Feldman
Modified: 2015-03-04 21:26 UTC (History)
0 users

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 Adam Feldman gentoo-dev 2014-12-19 15:50:18 UTC
When portage is using FEATURES="unmerge-backup" (and I would assume, but haven't tested "downgrade-backup") binary packages are built, even if the user specifies "--buildpkg-exclude"
Example:
>FEATURES="unmerge-backup" emerge -1 virtual/man --buildpkg-exclude "virtual/man"

From the emerge manpage:
>       --buildpkg-exclude ATOMS
>              A  space  separated  list  of  package atoms for which no binary
>              packages should be built. This  option  overrides  all  possible
>              ways to enable building of binary packages.

So this may, in fact, be desired behavior, but the man page states that it overrides "all possible ways," and this is clearly a method of enabling building binary packages.

If I have time later, I'll see if I can test a couple of other versions of portage to see if they exhibit the same behavior.
Comment 1 Adam Feldman gentoo-dev 2014-12-19 16:17:43 UTC
Tested with 2.2.8, 2.2.15, and 9999
Comment 2 Zac Medico gentoo-dev 2014-12-20 22:37:22 UTC
The --buildpkg-exclude option was added before unmerge-backup and downgrade-backup existed:

https://github.com/gentoo/portage/commit/2d78dcda11d753a54f821c7fb482b4bb3b511d0b

When I implemented unmerge-backup and downgrade-backup, making them interact with --buildpkg-exclude never crossed my mind because I never use --buildpkg-exclude myself:

https://github.com/gentoo/portage/commit/f807bb54317db5f8073f8904897cf4b9d87bf2cd

(In reply to NP-Hardass from comment #0)
> So this may, in fact, be desired behavior, but the man page states that it
> overrides "all possible ways," and this is clearly a method of enabling
> building binary packages.

I'm not so sure that making --buildpkg-exclude change the behavior of *-backup features is a good idea, because it could result in people losing the protection that the *-backup features are intended to provide. So, maybe we should simply update the documentation.
Comment 3 Adam Feldman gentoo-dev 2014-12-22 19:06:44 UTC
(In reply to Zac Medico from comment #2)
> I'm not so sure that making --buildpkg-exclude change the behavior of
> *-backup features is a good idea, because it could result in people losing
> the protection that the *-backup features are intended to provide. So, maybe
> we should simply update the documentation.

I think it makes sense that the *-backup features would be beyond the scope of --buildpkg-exclude. I would agree that the updating the documentation seems reasonable as a solution.
I discovered this because I wanted virtual packages, kernel sources, and binary packages to be excluded having binpkgs built, since for these packages, binpkgs aren't generally useful.
Ultimately, if you keep the current behavior, I would request that you consider a method of excluding packages from the *-backup features akin to --buildpkg-exclude.
Comment 4 Zac Medico gentoo-dev 2014-12-22 19:36:04 UTC
(In reply to NP-Hardass from comment #3)
> Ultimately, if you keep the current behavior, I would request that you
> consider a method of excluding packages from the *-backup features akin to
> --buildpkg-exclude.

You can already do it by using /etc/portage/package.env to reference an env file that sets FEATURES="-unmerge-backup -downgrade-backup". However, there's currently no way to do it via the command line.
Comment 5 Adam Feldman gentoo-dev 2014-12-22 19:38:34 UTC
(In reply to Zac Medico from comment #4)
> You can already do it by using /etc/portage/package.env to reference an env
> file that sets FEATURES="-unmerge-backup -downgrade-backup". However,
> there's currently no way to do it via the command line.

I didn't even think of that. :P  Command line isn't necessary.  Thanks.
Comment 6 Zac Medico gentoo-dev 2014-12-26 22:33:06 UTC
I have a patch for the emerge man page in the following branch:

	https://github.com/zmedico/portage/tree/bug_533036

I've posted it for review here:

	http://thread.gmane.org/gmane.linux.gentoo.portage.devel/5044
Comment 7 Zac Medico gentoo-dev 2015-01-05 20:10:23 UTC
This is in the master branch now:

https://github.com/gentoo/portage/commit/f2d25e174634151732b86e72befd3a90f048aeb8
Comment 8 Brian Dolbec (RETIRED) gentoo-dev 2015-03-04 21:26:45 UTC
Released in portage-2.2.16