[pacman-dev] [PATCH] pacman: don't nuke local repos with -Sc

Morgan Adamiec morganamilo at archlinux.org
Thu Jun 24 08:19:13 UTC 2021



On 24/06/2021 06:38, Allan McRae wrote:
> On 15/6/21 5:11 am, morganamilo wrote:
>> When using a local repo as a cachedir  pacman -Scc or pacman -Sc
>> without KeepCurrent will delete the repo database and packages
>> resulting in a lost database and non functional pacman.
>>
>> So special case file:/// repos in cache to not get nuked and foce
>> KeepCurrent on.
>> ---
> 
> This behaviour change is undocumented.
> 
> I don't think we should do this for -Scc.  That is explicitly asking all
> package files in cache directories to be removed, so that is what you get.
> 
> I also am leaning towards this behaviour for -Sc being unexpected (even
> if documented).  Pacman's job is really not to manage complex cache
> set-ups and I'm not convinced this should be supported.
> 
> Allan
> 


I want this to go ahead, especially with -Scc. Otherwise -Scc can end up
losing you your .db file, breaking pacman, the local repo's .db and all
the build packages.

This use case is not complex in my opinion. It's just adding one line to
your pacman.conf to stop every single package being duplicated.

If you're still against this do you have any alternative solutions in
mind to handle this?


More information about the pacman-dev mailing list