[pacman-dev] [PATCH] repo-add; add option to remove existing package files from disk
simongmzlj at gmail.com
Sat Jun 1 17:49:47 EDT 2013
On Thu, May 30, 2013 at 10:11:49AM +1000, Phillip Smith wrote:
> From: Phillip Smith <fukawi2 at gmail.com>
> when maintaining a custom repo, often it is undesirable to retain older
> versions of packages. this patch adds the --remove option to remove the
> current package file from disk before adding the new one to the
Sorry if this isn't the most appropriate place to share this, but its
somewhat relevant to the problem.
I've actually been developing a 3rd-party tool to replace repo-add for
database management: https://github.com/vodik/repose
It works different from repo-add - it tries to keep a directory and
a database in sync with each other. Filesystem changes propagate to the
database instead of having to be manually specified.
repose -Uscf /srv/http/packages/vodik.db
Repose reads the existing database into memory, automatically scan
/srv/http/packages to determine which packages are newest, add them into
the database. It has various abilities to clean up after itself and
delete old packages.
If a package has been removed from the filesystem the update operation
will also drop it from the database, no need to manually call
With this tool all I need to do is dump all the packages into one
directory and when I'm done run repose once. The problem I had with
repo-add is I had to remember the packages which got updated to properly
update the database. Often I just ended up doing `repo-add
vodik.db.tar.gz *.pkg.tar.xz`, which is expensive and sometimes does the
wrong thing (replaces a new package with an older version).
Repose is slightly faster then repo-add when generating a new database
and substantially faster at updating and existing one. Most importantly
it let me remove _a lot_ of logic from my package rebuild scripts.
More information about the pacman-dev