[arch-general] pacman overwriting files (was Re: dcron 4.2)

Dimitrios Apostolou jimis at gmx.net
Thu Feb 11 12:26:50 EST 2010


On Wed, 10 Feb 2010, Thomas Bächler wrote:
> Am 10.02.2010 21:30, schrieb Dimitrios Apostolou:
>> Guys that thing bit me again: During the big libpng upgrade
>> "initscripts" package got upgraded too and /etc/rc.{sysinit,shutdown}
>> got overwritten without notifying me. Because of special changes I've
>> made to mount /var as tmpfs, and because I forgot to put the files in
>> the NoUpgrade line of pacman.conf, the system was unbootable and after
>> fixing it pacman wants to download 500MB of packages again (ideas?). :-@
>>
>> Can't pacman just emit a big fat warning like: WARNING: /etc/rc.sysinit
>> USER CHANGES OVERWRITTEN
>>
>> Since this case is extremely rare, the message would appear scarcely. I
>> can't thing of anything negative for such a feature.
>
> This will definitely not happen. pacman will only notify you on files
> that are marked as "backup" in the package and thus listed in pacman
> -Qii! All other will be overwritten without a warning (pacman doesn't
> know you modified them). rc.{sysinit,shutdown} are not supposed to be

Thanks for the info, so it's not a matter of policy but I now see it's 
technically not feasible... I wish this was mentioned before. I now 
noticed that pacman stores the checksums of files in the %PACMAN% array 
inside "files" file. I somehow was under the impression that no checksums 
were needed, only the timestams inside the installation tarball.

> modified by the user - if you still want to do that, the NoUpgrade
> feature of pacman will do the job, but then you are completely on your
> own (Arch gives you all freedom you want, as long as you know you and
> only you are to blame for problems)!
>
> You should try to make your changes work inside Arch:
> 1) If your changes are general enough to make it into the mainstream
> initscripts as a feature (or an optional one), submit a feature request
> with a patch against latest git.
> 2) If your changes are for local usage only, try to integrate them with
> the new initscripts hooks system. You can also request to add more hooks
> to be added in initscripts, just open a feature request. The hooks
> system is explained in the comments in /etc/rc.d/functions.
>

My patch is only 3 lines before any other initialisation has taken place, 
and copies /var from disk to tmpfs. I'm using it on my Eee 901 for over 
one year, but it's really custom and non-portable. I didn't know about the 
new hooks system, I think I like it. When I find some time to port my 
3-lines patch to it, I'll post it here in case someone else needs it.


Dimitris


More information about the arch-general mailing list