diff --git a/debian/bin/touch b/debian/bin/touch deleted file mode 100755 index 4dbd957af..000000000 --- a/debian/bin/touch +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -set -e - -if [ -z "${1##-*}" ] && [ "$1" != -- ]; then - exec touch.orig "$@" -fi - -trap 'rm -f $TMP' EXIT -TMP=$(tempfile) - -# Create the files if they don't exist. -touch.orig -a "$@" - -tar -P --remove-files -cf $TMP "$@" -tar xfP $TMP -rm -f $TMP -exec touch.orig "$@" diff --git a/debian/lib/python/debian_linux/utils.py b/debian/lib/python/debian_linux/utils.py index 770fd4829..5f73837f0 100644 --- a/debian/lib/python/debian_linux/utils.py +++ b/debian/lib/python/debian_linux/utils.py @@ -1,19 +1,24 @@ import debian, re, textwrap -class _sorted_dict(dict): - __slots__ = ('_list') +class sorted_dict(dict): + __slots__ = '_list', def __init__(self, entries = None): - super(_sorted_dict, self).__init__() + super(sorted_dict, self).__init__() self._list = [] if entries is not None: for key, value in entries: self[key] = value def __delitem__(self, key): - super(_sorted_dict, self).__delitem__(key) + super(sorted_dict, self).__delitem__(key) self._list.remove(key) + def __setitem__(self, key, value): + super(sorted_dict, self).__setitem__(key, value) + if key not in self._list: + self._list.append(key) + def iterkeys(self): for i in iter(self._list): yield i @@ -26,14 +31,6 @@ class _sorted_dict(dict): for i in iter(self._list): yield self[i] -class sorted_dict(_sorted_dict): - __slots__ = () - - def __setitem__(self, key, value): - super(sorted_dict, self).__setitem__(key, value) - if key not in self._list: - self._list.append(key) - class field_list(list): TYPE_WHITESPACE = object() TYPE_COMMATA = object() diff --git a/debian/rules.real b/debian/rules.real index ee72e0e36..8e0412fcf 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -100,11 +100,6 @@ $(STAMPS_DIR)/source: debian/bin/apply.py mkdir -p '$(DIR)' cp -al $(srcfiles) '$(DIR)' $(patch_cmd) - #make-kpkg does this when building kernel-source. - mv '$(DIR)/scripts/package/Makefile' '$(DIR)/scripts/package/Makefile.dist' - mv '$(DIR)/scripts/package/builddeb' '$(DIR)/scripts/package/builddeb.dist' - echo "# Dummy Makefile" > '$(DIR)/scripts/package/Makefile' - echo "all:" >> '$(DIR)/scripts/package/Makefile' touch '$@' $(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH): SOURCE_DIR=$(BUILD_DIR)/source @@ -126,7 +121,6 @@ $(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH): $(STAMPS_DIR)/source # $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR=$(BUILD_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR) $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR): $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR) - ln -fs "$$(command -v touch)" debian/build/touch.orig cd '$(DIR)'; $(setup_env) PATH='$(CURDIR)/build:$(CURDIR)/bin:$(PATH)' $(kpkg_image) build touch '$@' @@ -140,6 +134,8 @@ $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR): $(BUILD_DIR)/config.$(ARCH)-$ touch '$@' install-base: + dh_installchangelogs + dh_installdocs dh_compress dh_fixperms dh_installdeb @@ -172,8 +168,6 @@ install-dummy: dh_testdir dh_testroot dh_clean -d -k - dh_installchangelogs - dh_installdocs $(MAKE) -f debian/rules.real install-base install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR): SOURCE_DIR=$(BUILD_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR) @@ -303,8 +297,6 @@ install-headers-all: dh_testdir dh_testroot dh_install $(DH_OPTIONS) debian/arch debian/lib debian/modules '/usr/src/linux-headers-$(VERSION)' - dh_installdocs $(DH_OPTIONS) - dh_installchangelogs $(DH_OPTIONS) dh_python $(DH_OPTIONS) -V 2.4 /usr/src/linux-headers-$(VERSION)/lib/python $(MAKE) -f debian/rules.real install-base DH_OPTIONS='$(DH_OPTIONS)' @@ -329,8 +321,6 @@ install-patch: chmod 755 '$(pfull)/apply/debian' '$(pfull)/unpatch/debian' chmod 644 '$(pfull)/debian/'*.patch bzip2 -9 '$(pfull)/debian/'*.patch - dh_installdocs $(DH_OPTIONS) - dh_installchangelogs $(DH_OPTIONS) $(MAKE) -f debian/rules.real install-base DH_OPTIONS='$(DH_OPTIONS)' install-source: DH_OPTIONS = -plinux-source-$(VERSION) @@ -338,8 +328,6 @@ install-source: $(BUILD_DIR)/linux-source-$(UPSTREAM_VERSION).tar.bz2 dh_testdir dh_testroot dh_install $(DH_OPTIONS) '$<' /usr/src - dh_installdocs $(DH_OPTIONS) README - dh_installchangelogs $(DH_OPTIONS) $(MAKE) -f debian/rules.real install-base DH_OPTIONS='$(DH_OPTIONS)' install-tree: DH_OPTIONS = -plinux-tree-$(VERSION)