[arch-dev-public] -ARCH package extension

Thomas Bächler thomas at archlinux.org
Fri May 11 13:51:16 EDT 2007


Dan McGee schrieb:
> Here is that bash function (it isn't idempotent, only run it once):
> makeoldname() {
>     mv $1 "${1%-*.pkg.tar.gz}.pkg.tar.gz"
> }

I used this function:

rmi686() {
  n=$(echo $1 | sed 's|-i686||')
  if [ ! -e $n ]; then
    mv $1 $n
  else
    echo "$n alread exists."
  fi
}


But it got inconvenient, so I changed extrapkg:

--- usr/bin/extrapkg	2006-04-28 04:54:19.000000000 +0200
+++ /usr/bin/extrapkg	2007-05-08 23:08:57.000000000 +0200
@@ -10,7 +10,9 @@
 fi

 source PKGBUILD
+pkg3file=${pkgname}-${pkgver}-${pkgrel}-i686.pkg.tar.gz
 pkgfile=${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz
+[ -f $pkg3file ] && mv $pkg3file $pkgfile

 if [ ! -f $pkgfile ]; then
 	pkgfile=$PKGDEST/$pkgfile

Works better IMO and doesn't add an extra step to package management.
Maybe we should add a similar workaround in devtools for now, as all
devs and TUs use it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://archlinux.org/pipermail/arch-dev-public/attachments/20070511/3f071990/attachment.pgp>


More information about the arch-dev-public mailing list