[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Where do I get a new dpkg ?



On Fri, Aug 27, 1999 at 04:54:54PM +0200, Pontus Lidman wrote:
> Shouldn't dpkg print hurd-i386? Is there a newer version? In that case,
> where?

No. If you think long enough about it, --print-architecture becomes
irritating anbd does not serve a well defined purpose. Indeed, nobody I
asked could tell me what it means.

Both "--print-installation-architure" and
"--print-gnu-build-os-architecture" have a well defined meaning, but only
the first is useful (prints "hurd-i386" on the Hurd). The second does only
reveal the GNU Host CPU, and not the full system type. Hence it prints
"i386" on i386-linux *and* i386-gnu.

To fix this silly situation, I designed and implemented the
dpkg-architecture tool. Try "dpkg-architeture" without options on the HUrd
and under Linux, and you will see what I mean. dpkg-architeture gives
complete control over the build and host architecture.

"dpkg --print-architecture" is therefore obsoleted and deprecated. I am
fighting hard to get rid of it in all the build scripts :)

> fps:~# dpkg --print-architecture
> dpkg: warning, architecture `i386' not in remapping table
> i386

Well, I could change dpkg to print something else, but there is no sensible
default. It is a sad fact that the meaning of "--print-architecture" is
nowhere precisely defined. (Neither in the source nor in the policy manual
nor in the dpkg docs). My dpkg-architecture OTOH provides a well defined
interface to the system architecture.

marcus@ulysses[0]:~/gnu/hurd/release$ dpkg-architecture
DEB_BUILD_ARCH=i386
DEB_BUILD_GNU_CPU=i386
DEB_BUILD_GNU_SYSTEM=linux
DEB_BUILD_GNU_TYPE=i386-linux
DEB_HOST_ARCH=i386
DEB_HOST_GNU_CPU=i386
DEB_HOST_GNU_SYSTEM=linux
DEB_HOST_GNU_TYPE=i386-linux

For cross compilation:
marcus@ulysses[0]:~/gnu/hurd/release$ CC=i386-gnu-gcc dpkg-architecture
DEB_BUILD_ARCH=i386
DEB_BUILD_GNU_CPU=i386
DEB_BUILD_GNU_SYSTEM=linux
DEB_BUILD_GNU_TYPE=i386-linux
DEB_HOST_ARCH=hurd-i386
DEB_HOST_GNU_CPU=i386
DEB_HOST_GNU_SYSTEM=gnu
DEB_HOST_GNU_TYPE=i386-gnu

Cheers,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org   finger brinkmd@ 
Marcus Brinkmann              GNU    http://www.gnu.org     master.debian.org
Marcus.Brinkmann@ruhr-uni-bochum.de                        for public  PGP Key
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       PGP Key ID 36E7CD09


Reply to: