[arch-general] [Bulk] Re: A good time to switch to dash as /bin/sh?

Benjamin A. Shelton zancarius at gmail.com
Sun Sep 28 05:04:49 UTC 2014

On 09/27/2014 02:13 AM, Ralf Mardorf wrote:
> On Sat, 2014-09-27 at 10:02 +0200, Florian Pelz wrote:
>> Same here. With only NoExtract, I linked /bin/sh to dash, reinstalled
>> bash, and /bin/sh was gone. With both NoExtract and NoUpgrade, I did
>> the same and /bin/sh was still a link to dash.
> My bad, until now I'm using NoExtract for files I don't want to have, I
> wasn't aware that a file or link we want to have gets lost.

Okay, so I wasn't *completely* losing my mind (what little of it there is!).

Here's what I think is happening (probably wrong, but this is what I've 
deduced from further reading and some strace fun):

Since (re)installing over an existing package first removes its 
constituent files, NoExtract alone results in the reinstallation process 
removing bash (and the /usr/bin/sh link). But, since the file is 
specified as NoExtract, the link/file isn't recreated during package 
extraction (it's skipped). NoUpgrade, on the other hand, prevents the 
file from being removed (reinstallation must therefore be considered as 
an "upgrade" for this purpose) but if it's not also specified by 
NoExtract, it's immediately overwritten by the new copy.

So, if my understanding is correct, this would explain why both options 
must be used in order to keep something relatively unscathed. NoUpgrade 
prevents its removal (or more accurately it "prevents its upgrade"); 
NoExtract prevents it from being overwritten.

Disclaimer: I haven't looked at the pacman sources yet. This is 
exclusively from observation and what my (admittedly very limited) 
understanding of pacman provides.


More information about the arch-general mailing list