[arch-general] A repo-add replacement?

Magnus Therning magnus at therning.org
Thu Feb 10 13:03:49 EST 2011


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 at therning.org   jabber: magnus at therning.org
twitter: magthe               http://therning.org/magnus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20110210/0b5c4dc1/attachment.asc>


More information about the arch-general mailing list