[kernel] r17464 - in dists/sid/linux-latest-2.6/debian: . bin
Ben Hutchings
benh at alioth.debian.org
Fri May 20 04:37:15 UTC 2011
Author: benh
Date: Fri May 20 04:37:02 2011
New Revision: 17464
Log:
Create and delete links for more files to be duplicated between packages
We want files provided for linux-foo to be duplicated in
linux-foo-bar, and files provided for linux-foo-bar to be duplicated
in linux-foo-2.6-bar.
Modified:
dists/sid/linux-latest-2.6/debian/bin/gencontrol.py
dists/sid/linux-latest-2.6/debian/rules
Modified: dists/sid/linux-latest-2.6/debian/bin/gencontrol.py
==============================================================================
--- dists/sid/linux-latest-2.6/debian/bin/gencontrol.py Fri May 20 00:16:15 2011 (r17463)
+++ dists/sid/linux-latest-2.6/debian/bin/gencontrol.py Fri May 20 04:37:02 2011 (r17464)
@@ -8,6 +8,8 @@
from debian_linux.gencontrol import Gencontrol as Base
from debian_linux.utils import Templates
+import os.path, re
+
class Gencontrol(Base):
def __init__(self, config):
super(Gencontrol, self).__init__(ConfigCoreDump(fp = file(config)), Templates(["debian/templates"]))
@@ -98,9 +100,9 @@
makeflags['GENCONTROL_ARGS'] = '-v%s' % self.package_version
- cmds_binary_arch = ["ln -sf linux-image.NEWS debian/%s.NEWS" % i['Package']
- for i in packages_dummy
- if i['Package'].startswith('linux-image-')]
+ cmds_binary_arch = []
+ for i in packages_dummy:
+ cmds_binary_arch += self.get_link_commands(i, ['NEWS'])
cmds_binary_arch += ["$(MAKE) -f debian/rules.real install-dummy DH_OPTIONS='%s' %s" % (' '.join(["-p%s" % i['Package'] for i in packages_dummy]), makeflags)]
makefile.add('binary-arch_%s_%s_%s_real' % (arch, featureset, flavour), cmds = cmds_binary_arch)
@@ -130,6 +132,7 @@
version = '-v1:%s' % self.package_version
else:
version = '-v%s' % self.package_version
+ cmds += self.get_link_commands(i, ['config', 'templates'])
cmds.append("$(MAKE) -f debian/rules.real install-dummy ARCH='%s' DH_OPTIONS='-p%s' GENCONTROL_ARGS='%s'" % (arch, i['Package'], version))
makefile.add('binary-arch_%s' % arch, ['binary-arch_%s_extra' % arch])
makefile.add("binary-arch_%s_extra" % arch, cmds = cmds)
@@ -144,5 +147,26 @@
entry[key] = value
return entry
+ @staticmethod
+ def get_link_commands(package, names):
+ cmds = []
+ for name in names:
+ match = re.match(r'^(linux-\w+)(-2.6)?(-.*)$', package['Package'])
+ if not match:
+ continue
+ if match.group(2):
+ source = 'debian/%s%s.%s' % (match.group(1), match.group(3),
+ name)
+ else:
+ source = None
+ if not (source and os.path.isfile(source)):
+ source = 'debian/%s.%s' % (match.group(1), name)
+ dest = 'debian/%s.%s' % (package['Package'], name)
+ if (os.path.isfile(source) and
+ (not os.path.isfile(dest) or os.path.islink(dest))):
+ cmds.append('ln -sf %s %s' %
+ (os.path.relpath(source, 'debian'), dest))
+ return cmds
+
if __name__ == '__main__':
Gencontrol(sys.argv[1] + "/config.defines.dump")()
Modified: dists/sid/linux-latest-2.6/debian/rules
==============================================================================
--- dists/sid/linux-latest-2.6/debian/rules Fri May 20 00:16:15 2011 (r17463)
+++ dists/sid/linux-latest-2.6/debian/rules Fri May 20 04:37:02 2011 (r17464)
@@ -18,3 +18,9 @@
-rm debian/control debian/control.md5sum debian/rules.gen
rm -f debian/*.bug-presubj
+# rules.include defines the 'clean' rule, so we add a dependency rather
+# than trying to redefine it.
+clean: clean-extra
+clean-extra:
+ find debian -maxdepth 1 -type l -delete
+.PHONY: clean-extra
More information about the Kernel-svn-changes
mailing list