#259864#5
Date:
2004-07-17 01:09:15 UTC
From:
To:
  Do provide debget the ability to fetch debs for architectures other
then the one it is curently running on. Something like:

    debget -a arch pkg

#259864#10
Date:
2010-05-26 17:16:15 UTC
From:
To:
Difficult.

We could pass -o Architecture=arch to all apt-get calls, but we would
need to download all indices for the given architecture first. apt-get
can do this only as root as far as I can see.

		Regards, Axel

#259864#15
Date:
2012-12-03 16:03:12 UTC
From:
To:
I was trying to use the "other" apt syntax for specifying an architecture
(apt-get install packagename:arch), and it looks like debget gets most of
the way there, it just needs some slightly smarter regex fu.

$ debget libtiff4:amd64
(libtiff4:amd64 -> 3.9.6-9)
< exits with error code 1, looks like it's because it runs with -e >

$ ( set -x ; . /usr/bin/debget libtiff4:amd64 )
+ . /usr/bin/debget libtiff4:amd64
++ LC_ALL=C
++ '[' 1 -eq 0 ']'
++ case $1 in
++ set +e
++ apt-get -q2 --print-uris --reinstall install dpkg
++ '[' 0 -ne 0 ']'
++ ls --color=auto /var/lib/apt/lists/
++ grep Release
++ set -e
++ for pkgspec in '$*'
++ set +e
++ apt-get -q2 --print-uris --reinstall install libtiff4:amd64
++ '[' 0 -ne 0 ']'
++ set -e
++ apt-cache show libtiff4:amd64
++ grep '^Ver'
++ read version
+++ echo Version: 3.9.6-9
+++ sed -ne '$s/^.*: \(.*\).*$/\1/p'
++ version=3.9.6-9
++ echo '(libtiff4:amd64 -> 3.9.6-9)'
(libtiff4:amd64 -> 3.9.6-9)
++ read version
+++ apt-get -q2 --print-uris --reinstall install libtiff4:amd64
+++ grep -F /libtiff4:amd64_
++ aptdata=

NB: apt-get -q2 --print-uris --reinstall install libtiff4:amd64 prints the
correct URI, sort of:

$ apt-get -q2 --print-uris --reinstall install libtiff4:amd64
'http://ftp.us.debian.org/debian/pool/main/t/tiff3/libtiff4_3.9.6-9_amd64.deb' libtiff4_3.9.6-9_amd64.deb 201908 MD5Sum:8665f1954dce043eae89908c3055e8a1
'http://ftp.us.debian.org/debian/pool/main/t/tiff3/libtiff4_3.9.6-9_i386.deb' libtiff4_3.9.6-9_i386.deb 200790 MD5Sum:b77f99baa7a74a7f570a3ca1c48d8005

NB2: My system is amd64 natively, I've run dpkg --add-architecture i386 and
such to get multiarch going, as you can see from the info below.