[arch-general] A repo-add replacement?
I've noticied that repo-add will blindly overwrite the entry of an already added package with whatever you point it to. Even if the existing entry is for a version that is newer. It basically means that "repo-add repo.db.tar.gz *.pkg.tar.xz" doesn't work that well :-( Is there some other tool for building a a repo db that doesn't follow my instructions so blindly? ;-) /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus
El 09/02/11 04:05, Magnus Therning dijo:
I've noticied that repo-add will blindly overwrite the entry of an already added package with whatever you point it to. Even if the existing entry is for a version that is newer. It basically means that "repo-add repo.db.tar.gz *.pkg.tar.xz" doesn't work that well :-(
Is there some other tool for building a a repo db that doesn't follow my instructions so blindly? ;-)
maybe you can use dbscripts[1], db-update and ftpdir-cleanup? [1] http://projects.archlinux.org/dbscripts.git/ -- Salud! Nicolás Reynolds, xmpp:fauno@kiwwwi.com.ar omb:http://identi.ca/fauno blog:http://selfdandi.com.ar/ gnu/linux user #455044 http://parabolagnulinux.org http://endefensadelsl.org
On 02/09/2011 05:05 PM, Magnus Therning wrote:
I've noticied that repo-add will blindly overwrite the entry of an already added package with whatever you point it to. Even if the existing entry is for a version that is newer. It basically means that "repo-add repo.db.tar.gz *.pkg.tar.xz" doesn't work that well :-(
Is there some other tool for building a a repo db that doesn't follow my instructions so blindly? ;-)
I solved this with a bit of find and sort.
repo-add repo.db.tar.gz `find . -name "*.pkg.tar.gz" | sort`
Regards, PyroPeter -- freenode/pyropeter ETAOIN SHRDLU
On Thu, Feb 10, 2011 at 06:33:07PM +0100, PyroPeter wrote:
On 02/09/2011 05:05 PM, Magnus Therning wrote:
I've noticied that repo-add will blindly overwrite the entry of an already added package with whatever you point it to. Even if the existing entry is for a version that is newer. It basically means that "repo-add repo.db.tar.gz *.pkg.tar.xz" doesn't work that well :-(
Is there some other tool for building a a repo db that doesn't follow my instructions so blindly? ;-)
I solved this with a bit of find and sort.
repo-add repo.db.tar.gz `find . -name "*.pkg.tar.gz" | sort`
That is in fact broken, because it sorts just like 'ls *': % ls *.pkg.tar.gz foo-1.2.3.1-1.pkg.tar.gz foo-1.2.3-1.pkg.tar.gz % find . -name \*.pkg.tar.gz|sort ./foo-1.2.3.1-1.pkg.tar.gz ./foo-1.2.3-1.pkg.tar.gz /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus
On 02/10/2011 07:03 PM, Magnus Therning wrote:
repo-add repo.db.tar.gz `find . -name "*.pkg.tar.gz" | sort`
That is in fact broken, because it sorts just like 'ls *':
% ls *.pkg.tar.gz foo-1.2.3.1-1.pkg.tar.gz foo-1.2.3-1.pkg.tar.gz % find . -name \*.pkg.tar.gz|sort ./foo-1.2.3.1-1.pkg.tar.gz ./foo-1.2.3-1.pkg.tar.gz
/M
It turns out GNU sort has a switch for sorting version numbers :-P $ find . -name \*.pkg.tar.gz | sort -V should work. Regards, PyroPeter -- freenode/pyropeter ETAOIN SHRDLU
On Thu, Feb 10, 2011 at 19:02, PyroPeter <abi1789@googlemail.com> wrote:
On 02/10/2011 07:03 PM, Magnus Therning wrote:
repo-add repo.db.tar.gz `find . -name "*.pkg.tar.gz" | sort`
That is in fact broken, because it sorts just like 'ls *':
% ls *.pkg.tar.gz foo-1.2.3.1-1.pkg.tar.gz foo-1.2.3-1.pkg.tar.gz % find . -name \*.pkg.tar.gz|sort ./foo-1.2.3.1-1.pkg.tar.gz ./foo-1.2.3-1.pkg.tar.gz
/M
It turns out GNU sort has a switch for sorting version numbers :-P
$ find . -name \*.pkg.tar.gz | sort -V
should work.
That does indeed seem to work. Thanks! :-) /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus
participants (3)
-
Magnus Therning
-
Nicolás Reynolds
-
PyroPeter