[pacman-dev] [PATCH] repo-add; add option to remove existing package files from disk

Allan McRae allan at archlinux.org
Wed May 29 21:46:16 EDT 2013


On 30/05/13 11:32, William Giokas wrote:
> On Thu, May 30, 2013 at 11:28:18AM +1000, Phillip Smith wrote:
>> On 30 May 2013 11:18, Phillip Smith <lists at fukawi2.nl> wrote:
>>> paccache certainly doesn't appear to achieve the same goal. In the
>>> example below, I would expect the pkgrel -1, -3, -4 of alsa-utils and
>>> libassuan-2.0.3-1-x86_64.pkg.tar.xz to be removed.
>>
>> Apologies, I was misusing it. I needed the -c option.
>>
>> Still, this patch enables it to be done in one action when adding the
>> new package(s), and paccache could be run on a schedule to cleanup any
>> mishaps.
> 
> Honestly, this is when I would say to call paccache in your repo-add
> function. As there is no separation between pacman and pacman-contrib
> anymore, it doesn't need any extra deps. Then things could still be done
> in one step while not duplicating code and introducing possible bugs.

I'm actually leaning towards liking this patch (but have a fix that is
needed...).  Currently repo management is a very tedious process.  This
alleviates some of the strain.

If you look at it, there is no code duplication.  All it does is delete
the current version from the repo directory before it updates to the new
package.  It won't clean up older packages than that.

paccache is a very much more generic cache cleaner.  This is purely repo
management and I think belongs in repo-add.

Does that make sense?

Allan



More information about the pacman-dev mailing list