Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 16342

Summary: emerge command to take a --exclude option for some packages
Product: Portage Development Reporter: Tim Haynes (RETIRED) <piglet>
Component: Enhancement/Feature RequestsAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: enhancement CC: daviebdawg, eitan, esigra, esqualante, gentoo, h3y, hkbst, moixa, nico-mahlo, pacho, rogerx.oss, rusxakep
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 144480, 155723, 335925    
Attachments: patch to add exclude for 2.0.49ish
patch to add exclude for 2.0.50ish
updated

Description Tim Haynes (RETIRED) gentoo-dev 2003-02-25 05:13:35 UTC
Just an enhancement - but when I see mission-critical packages being upgraded
and lots of trivial ones all mixed in at the same time, I quite often want to
postpone the more interesting ones and get the rest of the stuff out the way first.

Would it be possible therefore to add a `--exclude' option to emerge, thus :

emerge -u -p world --deep       # to tell me what's about to be updated
emerge -u world --deep --exclude={gcc,apache,mod_ssl,xfs-sources}

?

The next `-p -u world' would show those again until I take them slowly one at a
time.
Comment 1 Frank Aune 2003-06-12 18:51:51 UTC
You might also read this post in the forum, which discuss the same problems mentioned here.

http://forums.gentoo.org/viewtopic.php?t=57892&highlight=
Comment 2 SpanKY gentoo-dev 2003-07-23 20:50:29 UTC
*** Bug 25154 has been marked as a duplicate of this bug. ***
Comment 3 Kevin O'Shea 2004-01-31 16:10:59 UTC
im adding 2 attachments, emerge-exclude.patch is for 2.0.49, the other is self explanatory from there.

they allow you to exclude something from world/system (not deps tho) using the syntax: emerge -up world ^package-to-exclude ^another
Comment 4 Kevin O'Shea 2004-01-31 16:11:50 UTC
Created attachment 24707 [details, diff]
patch to add exclude for 2.0.49ish
Comment 5 Kevin O'Shea 2004-01-31 16:12:54 UTC
Created attachment 24708 [details, diff]
patch to add exclude for 2.0.50ish
Comment 6 Kevin O'Shea 2004-04-08 18:02:04 UTC
Created attachment 28921 [details, diff]
updated

here is an updated patch, applys to latest version, and fixes a couple stupid
mistakes
Comment 7 Roger 2004-04-09 00:35:06 UTC
yea. this is a must have. got so sick of /etc/portage not working that I gave in and just reverted to the old nvidia drivers that gentoo has marked stable as well as the most recent xfree.  

Got *really* tired of doing a dance to avoid down-grading lately. :-/

Ok. verified the patch works here by excluding the newest nvidia-kernel & nvidia-glx as they're masked when I try to do a emerge -UDp world.

(For the curious, to patch do the following:
# cd /usr/bin
# patch -p1 --dry-run </location/of/emerge.patch

omit --dry-run to actually patch and to uninstall a patch, use reverse -R option)
Comment 8 SpanKY gentoo-dev 2004-04-09 00:49:06 UTC
i really dont know what you mean by '/etc/portage not working', but i havent seen anything to indcate that
Comment 9 Roger 2004-04-09 15:50:16 UTC
/etc/portage files, you can set package names for emerge -U to ignore or 'not upgrade'.
Comment 10 Roger 2004-05-11 09:44:35 UTC
# emerge -UDp world ^media-video/nvidia-kernel-1.0.5336-r3 ^media-video/nvidia-glx-1.0.5336-r2
>>> --upgradeonly implies --update... adding --update to options.

These are the packages that I would merge, in order:

Calculating world dependencies -
!!! all ebuilds that could satisfy "~media-video/nvidia-kernel-1.0.5336" have been masked.
!!! possible candidates are:
- media-video/nvidia-kernel-1.0.5336-r3 (masked by: ~keyword)
- media-video/nvidia-kernel-1.0.5336-r2 (masked by: ~keyword)
!!!    (dependency required by "media-video/nvidia-glx-1.0.5336-r2" [ebuild])

!!! Problem with ebuild media-libs/libsdl-1.2.7
!!! Possibly a DEPEND/*DEPEND problem.

!!! Depgraph creation failed.


# cat /etc/portage/package.unmask
=media-video/nvidia-kernel-1.0.5336-r3
=media-video/nvidia-glx-1.0.5336-r2


argh. /me manually unmasks nvidia.
Comment 11 SpanKY gentoo-dev 2004-06-17 20:28:41 UTC
*** Bug 54248 has been marked as a duplicate of this bug. ***
Comment 12 Marius Mauch (RETIRED) gentoo-dev 2004-08-03 12:29:33 UTC
*** Bug 4980 has been marked as a duplicate of this bug. ***
Comment 13 Brian G. Peterson 2004-08-24 06:00:19 UTC
The 'updated' Attachment 28921 [details, diff] works with the latest portage ebuild
portage-2.0.50-r10
with minor offsets in some of the patch hunks.

We're finding this patch to be *really* useful here, as there are some things (for us it's PHP) that we're just not ready to upgrade on production hardware.
Comment 14 Roger 2004-08-24 15:06:46 UTC
Ditto.  Such as, "How many of us do not use kde, but have kdelibs installed and then must go through the 4-6 hour upgrade build because some apps require it?" <grin>

I must state again for clearity, package mask/unmask etc files, for me, do not work and my only resort is to use /usr/local/portage for preventing or encouraging package activity.  This exclude patch is great. 
Comment 15 Jason Stubbs (RETIRED) gentoo-dev 2005-05-24 16:32:51 UTC
*** Bug 87880 has been marked as a duplicate of this bug. ***
Comment 16 Jason Stubbs (RETIRED) gentoo-dev 2005-07-28 07:25:33 UTC
Putting a hold on feature requests for portage as they are drowning out the 
bugs. Most of these features should be available in the next major version of 
portage. But for the time being, they are just drowning out the major bugs and 
delaying the next version's progress. 
 
Any bugs that contain patches and any bugs for etc-update or dispatch-conf can 
be reopened. Sorry, I'm just not good enough with bugzilla. ;) 
Comment 17 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 11:54:32 UTC
*** Bug 118874 has been marked as a duplicate of this bug. ***
Comment 18 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 11:54:51 UTC
Reopening for consideration.
Comment 19 Techwolf 2009-02-17 06:40:07 UTC
(In reply to comment #18)
> Reopening for consideration.
> 

I vote for it because now vmware-workstation will block a emerge -e world from finishing overnight.
Comment 20 Roger 2009-02-17 06:58:09 UTC
It'd be a good temporary hack to complete an emerge world, until a fix is in.

But then, you'd have to prevent all further depending packages from also emerging.
Comment 21 Zac Medico gentoo-dev 2009-02-17 07:14:48 UTC
Note that this issue is mitigated by parallel builds with --jobs, since since shorter-running builds will automatically run alongside the longer running ones.
Comment 22 Techwolf 2009-02-18 03:28:31 UTC
--jobs will not work with vmware-workstation, portage aborts to the command line before doing any emerging. emerge -e world does not pull in new packages because one should do emerge -avuD world first. If it does, something failed. I like to do "emerge -e --keep-going --jobs 4 world" overnight and come back to what should be completed with no failed packages. My current hack is to removed vmware-workstation from the world file then add it back after the -e world.
Comment 23 Marius Mauch (RETIRED) gentoo-dev 2009-02-22 10:35:38 UTC
Set operators might be of some use here, though not exactly the most user-friendly solution in their current form.
Comment 24 Caleb Cushing 2009-03-05 23:29:12 UTC
mitigated but not resolved. my biggest peeve on this is the re-unpacking of kernel sources. those take a while, and do nothing for me.
Comment 25 Marijn Schouten (RETIRED) gentoo-dev 2009-08-02 14:58:18 UTC
Shouldn't this be a simple fix, especially with the attached patch?
Comment 26 Zac Medico gentoo-dev 2009-08-02 19:26:11 UTC
(In reply to comment #13)
> The 'updated' Attachment 28921 [details, diff] [edit] works with the latest portage ebuild
> portage-2.0.50-r10

Rather than doing stuff with syslist, the correct approach would be to modify depgraph._select_pkg_highest_available_imp() so that it will only select installed package instances for anything matched by an atom in --exclude.
Comment 28 Caleb Cushing 2010-04-29 13:00:00 UTC
excellent! speedy resolution
Comment 29 Pacho Ramos gentoo-dev 2010-04-29 17:38:59 UTC
Nice! Thanks a lot to Sebastian and you for your work :-D

Best regards
Comment 30 Zac Medico gentoo-dev 2010-09-22 03:48:45 UTC
This is fixed in 2.1.9.