Post details: Using Blockers to Automatically Uninstall Unwanted Packages

6 May , 2008

Permalink 18:29 UTC, by Zac MEDICO Email , 188 words, 1582 views   English (US)
Categories: Gentoo

Using Blockers to Automatically Uninstall Unwanted Packages

A while ago I wrote a blog entry about using blockers to adjust merge order. Now, in portage-2.1.5, blockers are also resolved automatically in cases when it makes sense to uninstall a conflicting package (bug #172812). This feature should allow automatic resolution of blocker conflicts in many more cases than previously possible, so Gentoo users won't be inconvenienced with the task of resolving them manually.

gtk-doc-am vs. gtk-doc-1.8-r2

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[nomerge      ] x11-libs/gtk+-2.12.9-r2  USE="X cups jpeg tiff xinerama -debug -doc -vim-syntax"
[ebuild  N    ]  dev-util/gtk-doc-am-1.10-r1  0 kB
[blocks b     ] dev-util/gtk-doc-am (is blocking dev-util/gtk-doc-1.8-r2)
[uninstall    ]  dev-util/gtk-doc-1.8-r2  USE="emacs -debug -doc"

Total: 1 package (1 new, 1 uninstall), Size of downloads: 0 kB
Conflict: 1 block

coreutils vs. mktemp

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild     U ] sys-apps/coreutils-6.11 [6.9-r1] USE="acl nls xattr (-selinux) -static -vanilla%" 0 kB
[blocks b     ]  sys-apps/mktemp (is blocking sys-apps/coreutils-6.11)
[blocks b     ] >=sys-apps/coreutils-6.10 (is blocking sys-apps/mktemp-1.5)
[uninstall    ]  sys-apps/mktemp-1.5

Total: 1 package (1 upgrade, 1 uninstall), Size of downloads: 0 kB
Conflict: 2 blocks

Trackback address for this post:

http://planet.gentoo.org/developers/htsrv/trackback.php/1519

Comments, Trackbacks:

Comment from: Donnie Berkholz [Visitor] Email · http://dberkholz.wordpress.com/
Sweeeeet!
PermalinkPermalink 6 May , 2008 @ 20:35
Comment from: Christian [Visitor] Email
Very cool! The most important improvement for Portage since a long time. That will probably reduce posts in the Portage forum by 10%! :-)
PermalinkPermalink 6 May , 2008 @ 20:59
Comment from: Daniel Drake [Visitor] Email · http://reactivated.net
That's excellent. Thanks!

You should also blog about the /etc/portage/modules thing where it makes sync really quick.
PermalinkPermalink 6 May , 2008 @ 22:44
Comment from: Zac MEDICO [Member] Email · http://dev.gentoo.org/~zmedico/

Actually, with portage-2.1.5 you don't need to do any /etc/portage/modules configuration to avoid the "Updating Portage cache" thing after sync. Now the default behavior is to use cache directly from the $PORTDIR/metadata/cache/ directory. As mentioned in the release notes, you have to add FEATURES=metadata-transfer to make.conf if you want the old behavior (which you probably don't).

PermalinkPermalink 7 May , 2008 @ 00:34
Comment from: Ciaran McCreesh [Visitor] Email
So you're unmerging mktemp *before* upgrading coreutils? Sounds like an extremely good way to break a system...
PermalinkPermalink 7 May , 2008 @ 03:26
Comment from: Zac MEDICO [Member] Email · http://dev.gentoo.org/~zmedico/
Admittedly, uninstallation of mktemp is a questionable operation. However it's the only solution given the constraint that two blocking packages cannot be installed simultaneously.
PermalinkPermalink 7 May , 2008 @ 05:23
Comment from: Ciaran McCreesh [Visitor] Email
The problem is, that's not really the constraint... Solving this properly requires extending the blocker syntax to say "it's ok if you uninstall this after rather than before installing me". Until that's an option, automatic block resolution is extremely dangerous.
PermalinkPermalink 7 May , 2008 @ 07:29
Comment from: Pacho Ramos [Visitor] Email
Thanks for add this feature :-D

About unmerging mktemp before coreutils, maybe portage could make a package before unmerging it with quickpkg for preventing a great breakage :-/
PermalinkPermalink 7 May , 2008 @ 11:56
Comment from: Zac MEDICO [Member] Email · http://dev.gentoo.org/~zmedico/
In the particular case of coreutils and mktemp, it would be safe install the new coreutils first (overlapping with the mktemp package) and then remove any remnants of the mktemp package. In order to express cases like this, we can create a separate type of blocker having this property.
PermalinkPermalink 7 May , 2008 @ 16:27
Comment from: mimosinnet [Visitor] Email · http://generatech.ningunlugar.org/
Christian is right. I am one of those who are familiar enough not to fear "Unmerging it may be damaging to your system", but still not fully aware of the consequences. (See, for example, http://forums.gentoo.org/viewtopic-t-688061.html).

Excellent feature! Most welcome!
PermalinkPermalink 28 May , 2008 @ 00:11

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))

Zack Medico

July 2008
Mon Tue Wed Thu Fri Sat Sun
<< <     
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Search

Categories

Archives

Misc

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 32

powered by
b2evolution