Skip a specific upgrade in emerge -auvD world

31

8

Is there a simple way to skip a certain upgrade in emerge -auvD world?

For example, currently there is a broken media-sound/teamspeak-server-bin-3.0.5-r1 marked as stable in the portage tree which breaks the whole upgrade since that package is the first one in the list. Of course I could simply mask this version using the package.mask file, but I'd prefer an environment variable or commandline switch to skip it only right now - it will probably be fixed soon anyway.

Note that I do not want to use emerge -auvD1 list of working packages (i.e. only updating the other packages by specifying all their names).

ThiefMaster

Posted 2012-05-17T09:45:52.523

Reputation: 4 918

Answers

39

Looks like the --exclude option does this:

--exclude ATOMS
A space separated list of package names or slot atoms. Emerge won't install any ebuild or binary package that matches any of the given package atoms.

So this did the job for me:

emerge -auvD --exclude=media-sound/teamspeak-server-bin world

ThiefMaster

Posted 2012-05-17T09:45:52.523

Reputation: 4 918

I haven't been able to find an example of someone excluding multiple packages in one statement, so for reference: each package requires an --exclude tag afaik. emerge --deep --update @world -av --exclude=chromium --exclude=firefox. – NuclearPeon – 2018-10-08T05:14:34.277

note: space is a separator, so e.g. use --exclude="teamspeak-server-bin gstreamer" – Florian Castellane – 2019-12-08T23:49:53.483

12

If you don't want to mask it you can use the --keep-going option. That makes the emerge reset its list and keep going, without the failed package in the list.

Keith

Posted 2012-05-17T09:45:52.523

Reputation: 7 263

3

ThiefMaster's answer is the right way to go, but there is another option, which I think improves upon Keith's answer. Namely, with his answer the emerge will be tried and may take time. In case you know that the first package is problematic because you've just encountered a problem, you can use --resume and --skipfirst:

--resume(-r)

Resumes the most recent merge list that has been aborted due to an error. This re-uses the arguments and options that were given with the original command that's being resumed, and the user may also provide additional options when calling --resume. It is an error to provide atoms or sets as arguments to --resume, since the arguments from the resumed command are used instead. Please note that this operation will only return an error on failure. If there is nothing for portage to do, then portage will exit with a message and a success condition. A resume list will persist until it has been completed in entirety or until another aborted merge list replaces it. The resume history is capable of storing two merge lists. After one resume list completes, it is possible to invoke --resume once again in order to resume an older list. The resume lists are stored in /var/cache/edb/mtimedb, and may be explicitly discarded by running emaint --fix cleanresume (see emaint(1)).

--skipfirst

This option is only valid when used with --resume. It removes the first package in the resume list. Dependencies are recalculated for remaining packages and any that have unsatisfied dependencies or are masked will be automatically dropped. Also see the related --keep-going option.

equaeghe

Posted 2012-05-17T09:45:52.523

Reputation: 291