FS#7622 - pacman stuck in infinite loop
Attached to Project:
Pacman
Opened by Scott H (stonecrest) - Monday, 16 July 2007, 05:54 GMT
Last edited by Dan McGee (toofishes) - Thursday, 15 November 2007, 06:08 GMT
Opened by Scott H (stonecrest) - Monday, 16 July 2007, 05:54 GMT
Last edited by Dan McGee (toofishes) - Thursday, 15 November 2007, 06:08 GMT
|
Details
If I run pacman -Rsc libcups, I get a line that is printed
out indefinitely.
$ pacman --debug=1 -Rsc libcups <snip> debug: checkdeps: found pidgin-mtn as required by gtkspell error: could not find pidgin-mtn in database -- skipping debug: checkdeps: found pidgin-mtn as required by gtkspell error: could not find pidgin-mtn in database -- skipping <snip> And so it goes.. Upon talking with Dan, I didn't have a pidgin-mnt dir in my local DB but it was in another gtkspell's REQUIREDBY. If nothing else, it would be nice if pacman handled this more elegantly so that it doesn't simply get stuck in an infinite loop - perhaps by simply removing the stale entry in the DB. |
This task depends upon
Closed by Dan McGee (toofishes)
Thursday, 15 November 2007, 06:08 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in GIT as stated in the comments. In addition, we no longer have explicit storage of requiredby, so this shouldn't ever happen again.
Thursday, 15 November 2007, 06:08 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in GIT as stated in the comments. In addition, we no longer have explicit storage of requiredby, so this shouldn't ever happen again.
http://projects.archlinux.org/git/?p=pacman.git;a=commitdiff;h=796cc4e6ed06644081f05c1aff4624a6e11eade3
+ if((p = _alpm_db_get_pkgfromcache(db, j->data)) == NULL) {
+ /* hmmm... package isn't installed... */
+ continue;
}
See here, if a package doesn't exist, checkdeps won't add it to the list, and so the code in remove.c won't loop.
The part printing the above message "error: could not find pidgin-mtn in database -- skipping" will never be reached actually :p
I was thinking that maybe pacman could have an option for detecting the broken requiredby fields, and maybe also repair them?
http://www.archlinux.org/pipermail/pacman-dev/2007-July/008917.html
loops with pacman 3.0.5 , works nice with pacman git.
So yep, it might be safer to not automatically try to repair these during a transaction.
But maybe a dedicated pacman option or a little external tool for repairing could be better.