Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#2913 - bug in pacman 2.9.6-2

Attached to Project: Pacman
Opened by michael (jacquesmerde2) - Monday, 04 July 2005, 11:32 GMT
Task Type Bug Report
Category
Status Closed
Assigned To Judd Vinet (judd)
Architecture not specified
Severity High
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

when upgrading to pacman-2.9.6-2 (through pacman), i got the following error:

could not extract etc/pacman.d/community: Is a directory
errors occurred while upgrading pacman
done.
/var/lib/pacman/local/pacman-2.9.6-2/install: line 14: vercmp: command not found
/var/lib/pacman/local/pacman-2.9.6-2/install: line 15: [: -lt: unary operator expected

caused by having created above directory
resulted in
bash: pacman: command not found
etc...
This task depends upon

Closed by  Judd Vinet (judd)
Wednesday, 06 July 2005, 19:06 GMT
Reason for closing:  Fixed
Comment by michael (jacquesmerde2) - Monday, 04 July 2005, 13:58 GMT
btw, this is my first ever bug report. please let me know if i've done anything wrong (too much/little information? wrong severity? etc...)


also, in retrospect, i think i that this latest update of pacman was the first since creating that community directory. so i have no idea if the bug is new to the latest version
Comment by Jan de Groot (JGC) - Monday, 04 July 2005, 14:29 GMT
I think pacman errors out because you put something over there that pacman couldn't overwrite. It's not version specific, it's a general problem with overwriting files.
Comment by michael (jacquesmerde2) - Monday, 04 July 2005, 14:34 GMT
oh, thats definitely WHY it errored out, but i think its a question of how it SHOULD error out.

creating the directory at first seemed like an innocuous thing to do, but it broke pacman, and i could only fix it by unpacking the pkg.tar.gz into /. I would think this is something newer users wouldnt want to face. especially since they can no longer use makepkg, pacman or abs to fix it since it is broken by this error.

also, i'm no code expert, but by looking at the error message, and the referred to code, it looked like the code could be fixed to respond more appropriately

Comment by michael (jacquesmerde2) - Monday, 04 July 2005, 14:46 GMT
let me try and say that again. two points:

1. the first error message, "could not extract etc/pacman.d/community: Is a directory", is all you need to see. the problem is that once you've gotten rid of the offending directory, you no longer have access to pacman. so if you try and move the directory and do pacman -S pacman, you get "bash: pacman: command not found"

2. isnt it normally a sign of a bug if running a program spits out raw error messages like "/var/lib/pacman/local/pacman-2.9.6-2/install: line 14: vercmp: command not found
/var/lib/pacman/local/pacman-2.9.6-2/install: line 15: [: -lt: unary operator expected"? someone on #archlinux suggested it reflected a bug in the code, which is why i filed the bug report.
Comment by Jan de Groot (JGC) - Monday, 04 July 2005, 16:51 GMT
What actually happens is that pacman tries to overwrite a directory with a file. Upon hitting this error, pacman bails out on the extraction procedure, which means half of pacman isn't installed. It then continues to the deletion of the previous version somehow and runs the postinstall script which uses commands not on your system anymore.

I think pacman should abort on these errors instead of just going on with tasks.
Comment by michael (jacquesmerde2) - Monday, 04 July 2005, 16:58 GMT
oh, thanks for explaining that. i was confused why the lines referred to in the error were part of the postinstall script.

yeah, pacman should DEFINITELY abort on the error, if not be able to go back to the original pacman it was updating.

if you're a newbie like me, trying to install pacman again without pacman or makepkg, is like trying to dload a network driver from the internet, because you need a netwrok driver from the internet to be able to connect to the internet
Comment by Judd Vinet (judd) - Monday, 04 July 2005, 19:09 GMT
Aborting at the point of failure in this specific example would not have saved anything. It would have avoided the bash scriptlet errors at the end, but you would still be left without a pacman binary on your system.

The reason is that the old pacman was removed first. Then, during the install-the-new-pacman phase, the errors occurred and pacman bailed out.

The only nice way to fix something like this is with transactions, where one could roll back a failed upgrade. Pacman 3.0 has some transaction support, but I don't think it will be enabled by default (too slow for typical upgrades).
Comment by michael (jacquesmerde2) - Tuesday, 05 July 2005, 03:15 GMT
shouldnt a package manager check if an updated package is going to install without error (within reason), before deleting the previous one?
Comment by Judd Vinet (judd) - Wednesday, 06 July 2005, 19:06 GMT
This has been fixed in CVS and will appear in the next pacman release.

Thanks.

Loading...