From 0959a881974f2dc7aa0a250ff05548e100a4732c Mon Sep 17 00:00:00 2001 From: Chris Lawrence Date: Sun, 30 Mar 2008 17:36:18 -0500 Subject: [PATCH] lsb 3.2-6 Debian release. --- debian/changelog | 11 +++++++++++ debian/lsb-release.postinst | 10 ++++------ debian/rules | 16 ++++++++-------- lsb_release | 12 ++++++++---- 4 files changed, 31 insertions(+), 18 deletions(-) diff --git a/debian/changelog b/debian/changelog index 86cd3be..45f75c8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +lsb (3.2-6) unstable; urgency=low + + * Kill old versions of /etc/lsb-release deader. (Closes: #467219) + * Fix debian/rules: + + Change DEB_BUILD_ARCH_CPU -> DEB_HOST_ARCH_CPU + ("host" is what we're building for) + + Detect armel using DEB_HOST_GNU_CPU_TYPE=arm-linux-gnueabi + * Remove duplicate LSB modules from lsb_release -v output. + + -- Chris Lawrence Sun, 30 Mar 2008 17:36:18 -0500 + lsb (3.2-5) unstable; urgency=low * Fix init-functions with set -e. (Closes: #472794) diff --git a/debian/lsb-release.postinst b/debian/lsb-release.postinst index 0c29c56..657dd88 100644 --- a/debian/lsb-release.postinst +++ b/debian/lsb-release.postinst @@ -2,12 +2,10 @@ case "$1" in configure) - if dpkg --compare-versions "$2" lt-nl 3.0-8; then - if [ -e /etc/lsb-release ]; then - MD5SUM=`md5sum /etc/lsb-release | cut -d" " -f1` - if [ "$MD5SUM" = "b5bfe10d9b02fb4e4a45337d1c4d88ab" ]; then - rm -f /etc/lsb-release - fi + if [ -e /etc/lsb-release ]; then + MD5SUM=`md5sum /etc/lsb-release | cut -d" " -f1` + if [ "$MD5SUM" = "b5bfe10d9b02fb4e4a45337d1c4d88ab" ]; then + rm -f /etc/lsb-release fi fi ;; diff --git a/debian/rules b/debian/rules index 94de165..7f4c01e 100755 --- a/debian/rules +++ b/debian/rules @@ -9,13 +9,13 @@ # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -DEB_BUILD_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU 2>/dev/null) +DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null) # Take account of old dpkg-architecture output. -ifeq ($(DEB_BUILD_ARCH_CPU),) - DEB_BUILD_ARCH_CPU := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU) - ifeq ($(DEB_BUILD_ARCH_CPU),x86_64) - DEB_BUILD_ARCH_CPU := amd64 +ifeq ($(DEB_HOST_ARCH_CPU),) + DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU) + ifeq ($(DEB_HOST_ARCH_CPU),x86_64) + DEB_HOST_ARCH_CPU := amd64 endif endif @@ -27,7 +27,7 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) endif # Map Debian architectures to LSB architectures -lsbarch=${DEB_BUILD_ARCH_CPU} +lsbarch=${DEB_HOST_ARCH_CPU} ifeq (${lsbarch}, i386) lsbarch=ia32 endif @@ -134,7 +134,7 @@ binary-arch: build install # dh_undocumented dh_installchangelogs -a @echo >> debian/lsb-core.substvars "glibc=${LIBC}" - @[ ${DEB_BUILD_ARCH_CPU} != 'armel' ] && echo >> debian/lsb-cxx.substvars "depends=libstdc++5" || true + @[ ${DEB_HOST_GNU_TYPE} != 'arm-linux-gnueabi' ] && echo >> debian/lsb-cxx.substvars "depends=libstdc++5" || true @echo >> debian/lsb-core.substvars "provides=lsb-core-${lsbarch}" @echo >> debian/lsb-cxx.substvars "provides=lsb-cxx-${lsbarch}" @echo >> debian/lsb-graphics.substvars "provides=lsb-graphics-${lsbarch}" @@ -143,7 +143,7 @@ binary-arch: build install @echo >> debian/lsb-multimedia.substvars "provides=lsb-multimedia-${lsbarch}" @echo >> debian/lsb-languages.substvars "provides=lsb-languages-${lsbarch}" @echo >> debian/lsb-printing.substvars "provides=lsb-printing-${lsbarch}" - @[ ${DEB_BUILD_ARCH_CPU} = 'amd64' ] && echo >> debian/lsb-core.substvars "depends=libc6-i386, lib32z1" || true + @[ ${DEB_HOST_ARCH_CPU} = 'amd64' ] && echo >> debian/lsb-core.substvars "depends=libc6-i386, lib32z1" || true dh_link -a dh_strip -a dh_compress -a diff --git a/lsb_release b/lsb_release index a9744d2..9900b2e 100755 --- a/lsb_release +++ b/lsb_release @@ -75,6 +75,8 @@ def valid_lsb_versions(version, module): return [version] +import sets + # This is Debian-specific at present def check_modules_installed(): # Find which LSB modules are installed on this system @@ -82,7 +84,7 @@ def check_modules_installed(): if not output: return [] - modules = [] + modules = sets.Set() for line in output.split(os.linesep): version, provides = line.split(' ', 1) version = version.split('-', 1)[0] @@ -95,14 +97,16 @@ def check_modules_installed(): # If no versioned provides... if mgroups.get('version'): module = '%(module)s-%(version)s-%(arch)s' % mgroups - modules += [module] + modules.add(module) else: module = mgroups['module'] for v in valid_lsb_versions(version, module): mgroups['version'] = v module = '%(module)s-%(version)s-%(arch)s' % mgroups - modules += [module] - + modules.add(module) + + modules = list(modules) + modules.sort() return modules longnames = {'v' : 'version', 'o': 'origin', 'a': 'suite', -- 2.30.2