[Pkg-sysvinit-devel] Bug#340285: DEB_HOST_ARCH_OS and older dpkg versions

Erich Schubert erich at debian.org
Tue Nov 22 23:59:49 UTC 2005


Hi,
This is the code used by coreutils to handle older dpkg-versions:
# work around dpkg changes
DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU
2>/dev/null)
DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS
2>/dev/null)
ifeq ($(DEB_HOST_ARCH_CPU),)
  DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
  ifeq ($(DEB_HOST_ARCH_CPU),x86_64)
    DEB_HOST_ARCH_CPU := amd64
  endif
endif
ifeq ($(DEB_HOST_ARCH_OS),)
  DEB_HOST_ARCH_OS := $(subst -gnu,,$(shell dpkg-architecture
-qDEB_HOST_GNU_SYSTEM))
  ifeq ($(DEB_HOST_ARCH_OS),gnu)
    DEB_HOST_ARCH_OS := hurd
  endif
endif

Looks quite clean to me.
Openssh uses the same code for _OS, but doesn't use _CPU at all.

best regards,
Erich Schubert
-- 
    erich@(vitavonni.de|debian.org)    --    GPG Key ID: 4B3A135C    (o_
      Which is worse: ignorance or apathy? Who knows? Who cares?     //\
   Die kürzeste Verbindung zwischen zwei Menschen ist ein Lächeln.   V_/_





More information about the Pkg-sysvinit-devel mailing list