FS#9556 - Problem with replacing packages

Attached to Project: Arch Linux
Opened by Antek Aduszkiewicz (senjin) - Wednesday, 13 February 2008, 00:19 GMT
Last edited by Roman Kyrylych (Romashka) - Wednesday, 13 February 2008, 08:51 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture i686
Severity High
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

1. When pacman ask you if you want to replace one package by another, you answer yes, but then pacman is stopped because of some other problem, the old package is being removed, but the new one is not installed.

2. If kernel installation fails, it shouldn't replace the old working kernel. When I was updating the kernel, I got endless list of errors like "grep: : no such file or directory" and "mktemp - command not found". I hit ^C, but the kernel was broken.


Steps to reproduce:
This happened today for me:

1. I typed pacman -Syu.
2. It asked me if I want to replace mktemp with coreutils - I answered yes.
3. Then I got nvidia bug (/usr/lib/libXvMCNVIDIA_dynamic.so.1 file conflict). I have read on the forum that it's not a serious problem and I should do use "force" option.
4. I did pacman -Sf nvidia, but pacman wanted to update kernel also.
5. Kernel update failed. I got ton of "mktemp - command not found" messages. The system (kernel) was broken, when I tried to reboot, I got only "ramfs" prompt...
6. I booted from arch cd, installed back mktemp, installed kernel (the new one, 2.6.24) successfully, rebooted, did pacman -Sfu - now everything works fine.

So - it seems that mktemp was deleted, but nvidia file conflict stopped pacman, and coreutils wasn't installed. Also it was my fault, because the nvidia problem was in the "nvidia-utils" package not "nvidia" package... but anyway this should not happen.
This task depends upon

Closed by  Roman Kyrylych (Romashka)
Wednesday, 13 February 2008, 08:51 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#9088 
Comment by Travis Willard (Cerebral) - Wednesday, 13 February 2008, 01:24 GMT
This is due to the fact that pacman treats a 'replace' operation like a remove, followed by an upgrade.

1) You answered yes to remove mktemp, and replace with coreutils.
2) All packages downloaded from the repos.
3) Pacman removed mktemp ('cause you told it you could)
4) Pacman then attempts to upgrade all the packages you downloaded.
5) Pacman fails, because of filesystem conflicts with nvidia.
6) Pacman quits, leaving mktemp removed from your filesystem, but the new coreutils isn't installed.

The solution in your case would have been to simply pacman -S coreutils before rebooting.

In anycase, this behaviour should probably be looked at in pacman. I'm not sure how complicated it'd be to do all the filesystem checks before removing mktemp instead of after.
Comment by Xavier (shining) - Wednesday, 13 February 2008, 07:44 GMT
This bug is bad, but not so easy to fix :/
Anyway, this was already reported in  bug 9088 , so I will request closure for this one
(but having several reports for the same bug increases its importance, so it was not totally worthless).

Loading...