You are not logged in.

#1 2013-08-10 23:37:30

luran
Member
Registered: 2012-09-11
Posts: 2

[SOLVED] repo-add replaces newer version package with old ones

Say I have two versions of nspr.

$ ls -1 nspr*.pkg.tar.xz
nspr-4.10-2-x86_64.pkg.tar.xz
nspr-4.9.6-1-x86_64.pkg.tar.xz

When I run repo-add on both of them, version 4.9.6 will be the one remaining in the database.

$ repo-add custom.db.tar.gz nspr*.pkg.tar.xz
==> Extracting database to a temporary location...
==> Adding package 'nspr-4.10-2-x86_64.pkg.tar.xz'
  -> Computing checksums...
  -> Removing existing entry 'nspr-4.9.6-1'...
  -> Creating 'desc' db entry...
  -> Creating 'depends' db entry...
==> Adding package 'nspr-4.9.6-1-x86_64.pkg.tar.xz'
  -> Computing checksums...
  -> Removing existing entry 'nspr-4.10-2'...
  -> Creating 'desc' db entry...
  -> Creating 'depends' db entry...
==> Creating updated database file 'custom.db.tar.gz'

I think here the natural order should be used, something like

$ repo-add custom.db.tar.gz $(ls -v nspr*.pkg.tar.xz)

as this is the expected behaviour from most users.

Last edited by luran (2013-10-07 23:43:21)

Offline

#2 2013-08-10 23:55:53

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] repo-add replaces newer version package with old ones

When only one version of a package will ever be present in the db, why try adding more? Just pass the version you want. You can use 'ls -v' if you prefer, but I think it's the shell's interpretation of the wildcard and not repo-add to blame.

Offline

#3 2013-08-11 01:00:43

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: [SOLVED] repo-add replaces newer version package with old ones

repo-add --new

Offline

#4 2013-08-11 01:10:55

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] repo-add replaces newer version package with old ones

Allan wrote:

repo-add --new

Either I'm completely misunderstanding OP or you are. Even with '--new' only the last (as in the last argument in that command) version of the package will remain in the db. It doesn't mean the latest one, the problem is still the same.

Last edited by karol (2013-08-11 01:13:24)

Offline

#5 2013-08-11 02:19:42

luran
Member
Registered: 2012-09-11
Posts: 2

Re: [SOLVED] repo-add replaces newer version package with old ones

karol wrote:

When only one version of a package will ever be present in the db, why try adding more? Just pass the version you want. You can use 'ls -v' if you prefer, but I think it's the shell's interpretation of the wildcard and not repo-add to blame.

Thanks for your reply. Now I agree repo-add should just process the files according to the order given by the shell.

To anwser your question, I need to make a local repository regularly to be shared with my other machine, because I have a very limited Internet quota and the sharing roughly halves the downloads. Usally I just use the wildcard for all the packages in the cache, and it works fine as long as the package version does not jump to 10+ like the above example. 'ls -v' will do the job for me. Cleaning the old packages could be another option, but occasionally I need to revert some package back to an old version.

Offline

#6 2013-08-11 02:22:12

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] repo-add replaces newer version package with old ones

There are many ways to share the package cache https://wiki.archlinux.org/index.php/Cu … cman_cache

Offline

#7 2013-08-11 09:45:53

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: [SOLVED] repo-add replaces newer version package with old ones

I quite expectedly recommend pacserve for sharing packages across computers. The shared cache method can easily remove packages that you'd like to keep when cleaning the cache, unless both systems use exactly the same set of packages.

Incidentally, repo-add_and_sign will filter the command-line arguments so that only the latest version of each package is added to the repo.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB