[Slapt-get-user] Bug: coallation of backwards requirements (reliance) breaks

Cathy Garrett Cathy.Garrett at gmail.com
Sat Feb 9 15:56:32 EST 2008


Okay, I'm rather verbose in print. There's nothing I can do about it, so
here we go. I don't participate in a lot of mailing lists, so a lot of
the etiquette is lost on me so if this is going to the wrong address or
not formatted properly for some tastes, again, can't be helped.

I'm now running Slack12 after slapt-get'ing a dist-upgrade from Slack11.
After that, I upgraded from Freerock to GSB 2.20 by just slapt-get'ing
gsb-complete. I'm now going through to find all of the frg packages left
behind by the gsb upgrade and came across gconf. That's required and
all, so I wondered why it wasn't upgraded in gsb.

Turns out, it was, but they renamed it "GConf" without adding a conflict
with "gconf". Go fig. Anyway, that's neither here nor there. The issue I
joined the mailing list to report is that when I went to ask slapt-get
what packages were relying on gconf without telling it to explicitly
remove gconf, there was no option for that. Luckily, the slapt-get
package database is in plaintext, so I could just run up my own
--what-requires hack, which is attached.

I found out that nothing in my upgraded box is relying on gconf, and
GConf is installed and doing its job, so I can remove gconf, right?
Well, slapt-get --remove gconf also wants to uninstall gsb-complete.

Whaaaaaa?

Little investigation reveals a probable pattern matching bug in
slapt-get 0.9.12c's "^PACKAGE REQUIRED:" matcher. GConf's PACKAGE
REQUIRED: line looks, in short, like this:

PACKAGE REQUIRED:
bunch-of-packages,compizconfig-backend-gconf,bunch-more-packages,gconf-editor,gconfmm,whole-bunch-more-packages

Now, being that slapt-get doesn't want to remove the installed package
ccsm, whose entry contains:

PACKAGE REQUIRED:   blah-blah-blah,compizconfig-backend-gconf

nor the installed package bakery whose entry contains:

PACKAGE REQUIRED:   blah-blah,gconfmm,yada-yada

(There are no other packages, besides gsb-complete, which require
gconf-editor, but one would assume it would be matched in the same
fashion as gconfmm.)

I surmise that the pattern matching done to determine if a given package
relies on a package up for deletion, and thus should itself be included
in the deletion set, can't distinguish proper suffixes when embedded in
the middle of a list. It can't tell "...,compizconfig-backend-gconf,..."
from "...,gconf,..." even as it properly excludes "...,gconfmm,...". and
"...,compizconfig-backend-gconf".

There are no other examples on my box where an installed package is
named a proper suffix of another installed package, so I contrived an
example where the errantly included package name was first in the
REQUIRED field by moving compizconfig-backend-gconf to the front of the
list in the ccsm entry and tried slapt-get --remove gconf again. this
time it not only incorrectly picks up gsb-complete, but also ccsm,
confirming that the proper suffix bug also strikes when the suffixed
package is listed first in the REQUIRED field.

Now, I know someone reading this might say, "Just use --no-dep and
remove gconf without removing gsb-complete or ccsm or anything else."
Sage advice to be sure, but advice which is meaningless since slapt-get
--remove gconf --no-dep results in a segfault on my machine, though I'm
at a loss to guess how the above bug could cause that segfault.

Note that the what-requires script I've attached does make all proper
distinctions, as well as matching relied upon packages when listed at
either the front, or back (or both if it's a single reliance situation),
or in the middle of the list. (It even handles package names with
embedded +s (i.e. gtk+2) once I escaped them.I don't know if there are
any package names that include ?, *, {, }, or any other pattern special
characters in their names, but if so, what-requires would likely barf if
it came up with any output at all.)

I'd also like to take this opportunity to lobby for the inclusion of
some of the more common rpm abbreviations: -q for --show, -U for
--upgrade, and -e for --remove. (And even adding --query for show and
--erase for --remove. Go ahead and leave them out of the docs if you
don't want to be perceived to be styling after rpm, but it'd be nice. If
the slapt-get command were implemented as a shell script, I'd have added
them myself locally.)

-- 
Cathy Garrett
Cathy.Garrett at gmail.com
GPG Fingerprint: 42FC 9F42 045E 94B5 23F3  9310 D5A6 E287 9980 D06D
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: what-requires
Url: http://software.jaos.org/pipermail/slapt-get-user/attachments/20080209/ff010706/attachment.ksh 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://software.jaos.org/pipermail/slapt-get-user/attachments/20080209/ff010706/attachment.pgp 


More information about the Slapt-get-user mailing list