[linux] 01/05: Move merge_packages function from debian/bin/gencontrol.py to gencontrol module
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Fri Jun 10 13:47:55 UTC 2016
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch master
in repository linux.
commit fb5d7962726eb1ede60087c995d16bed08d9a12b
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Sun May 29 14:27:04 2016 +0100
Move merge_packages function from debian/bin/gencontrol.py to gencontrol module
linux-signed will use this function in future.
---
debian/bin/gencontrol.py | 29 +++++-----------------------
debian/changelog | 4 ++++
debian/lib/python/debian_linux/gencontrol.py | 19 ++++++++++++++++++
3 files changed, 28 insertions(+), 24 deletions(-)
diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py
index b87be73..685f160 100755
--- a/debian/bin/gencontrol.py
+++ b/debian/bin/gencontrol.py
@@ -13,7 +13,7 @@ import subprocess
from debian_linux import config
from debian_linux.debian import *
-from debian_linux.gencontrol import Gencontrol as Base
+from debian_linux.gencontrol import Gencontrol as Base, merge_packages
from debian_linux.utils import Templates, read_control
class Gencontrol(Base):
@@ -167,7 +167,7 @@ class Gencontrol(Base):
makeflags['DO_TOOLS'] = False
- self.merge_packages(packages, packages_headers_arch, arch)
+ merge_packages(packages, packages_headers_arch, arch)
cmds_build_arch = ["$(MAKE) -f debian/rules.real build-arch-arch %s" % makeflags]
makefile.add('build-arch_%s_real' % arch, cmds=cmds_build_arch)
@@ -212,7 +212,7 @@ class Gencontrol(Base):
for package in udeb_packages:
package['Build-Profiles'] = '<!stage1>'
- self.merge_packages(packages, udeb_packages, arch)
+ merge_packages(packages, udeb_packages, arch)
# These packages must be built after the per-flavour/
# per-featureset packages. Also, this won't work
@@ -233,7 +233,7 @@ class Gencontrol(Base):
headers_featureset = self.templates["control.headers.featureset"]
package_headers = self.process_package(headers_featureset[0], vars)
- self.merge_packages(packages, (package_headers,), arch)
+ merge_packages(packages, (package_headers,), arch)
cmds_binary_arch = ["$(MAKE) -f debian/rules.real binary-arch-featureset %s" % makeflags]
makefile.add('binary-arch_%s_%s_real' % (arch, featureset), cmds=cmds_binary_arch)
@@ -388,7 +388,7 @@ class Gencontrol(Base):
makeflags['DEBUG'] = True
packages_own.extend(self.process_packages(self.templates['control.image-dbg'], vars))
- self.merge_packages(packages, packages_own + packages_dummy, arch)
+ merge_packages(packages, packages_own + packages_dummy, arch)
tests_control = self.process_package(
self.templates['tests-control.main'][0], vars)
@@ -473,25 +473,6 @@ class Gencontrol(Base):
'debian/linux-image-%s%s-dbg.lintian-overrides' %
(vars['abiname'], vars['localversion']))
- def merge_packages(self, packages, new, arch):
- for new_package in new:
- name = new_package['Package']
- if name in packages:
- package = packages.get(name)
- package['Architecture'].add(arch)
-
- for field in 'Depends', 'Provides', 'Suggests', 'Recommends', 'Conflicts':
- if field in new_package:
- if field in package:
- v = package[field]
- v.extend(new_package[field])
- else:
- package[field] = new_package[field]
-
- else:
- new_package['Architecture'] = arch
- packages.append(new_package)
-
def process_changelog(self):
act_upstream = self.changelog[0].version.upstream
versions = []
diff --git a/debian/changelog b/debian/changelog
index 1459180..43c844c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ linux (4.6.1-2) UNRELEASED; urgency=medium
* bug script: Put binary package name and version in the info file so
linux-signed can easily replace them
+ * Move merge_packages function from debian/bin/gencontrol.py to
+ gencontrol module
-- Ben Hutchings <ben at decadent.org.uk> Tue, 07 Jun 2016 19:37:55 +0100
@@ -72,6 +74,8 @@ linux (4.6-1~exp2) experimental; urgency=medium
* linux-image: prerm: Ignore version of running kernel inside a container or
chroot
* [s390] udeb: Drop all packages, since s390 no longer has its own kernel
+ * udeb: Drop packages for modules that will later be signed; these packages
+ will be taken over by src:linux-signed
[ Aurelien Jarno ]
* [mips64{,el}] Set CPU to MIPS64 R2.
diff --git a/debian/lib/python/debian_linux/gencontrol.py b/debian/lib/python/debian_linux/gencontrol.py
index 4972737..8dfff83 100644
--- a/debian/lib/python/debian_linux/gencontrol.py
+++ b/debian/lib/python/debian_linux/gencontrol.py
@@ -299,3 +299,22 @@ class Gencontrol(object):
for key, value in entry.items():
f.write(u"%s: %s\n" % (key, value))
f.write('\n')
+
+def merge_packages(packages, new, arch):
+ for new_package in new:
+ name = new_package['Package']
+ if name in packages:
+ package = packages.get(name)
+ package['Architecture'].add(arch)
+
+ for field in 'Depends', 'Provides', 'Suggests', 'Recommends', 'Conflicts':
+ if field in new_package:
+ if field in package:
+ v = package[field]
+ v.extend(new_package[field])
+ else:
+ package[field] = new_package[field]
+
+ else:
+ new_package['Architecture'] = arch
+ packages.append(new_package)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list