[kernel] r6371 - in dists/sid/linux-2.6/debian: . bin
lib/python/debian_linux modules
Bastian Blank
waldi at costa.debian.org
Wed Apr 5 08:57:02 UTC 2006
Author: waldi
Date: Wed Apr 5 08:57:00 2006
New Revision: 6371
Modified:
dists/sid/linux-2.6/debian/bin/gencontrol.py
dists/sid/linux-2.6/debian/lib/python/debian_linux/config.py
dists/sid/linux-2.6/debian/lib/python/debian_linux/gencontrol.py
dists/sid/linux-2.6/debian/modules/gencontrol.py
dists/sid/linux-2.6/debian/rules.real
Log:
* debian/bin/gencontrol.py: Move linux-2.6 specific init stuff.
* debian/lib/python/debian_linux/config.py: Export config_parser.
* debian/lib/python/debian_linux/gencontrol.py:
Remove linux-2.6 specific init stuff.
* debian/modules/gencontrol.py
- Add own init stuff, read version file.
- Add linux-support-* as build dependency to modules packages.
* debian/rules.real: Build version file in support package.
Modified: dists/sid/linux-2.6/debian/bin/gencontrol.py
==============================================================================
--- dists/sid/linux-2.6/debian/bin/gencontrol.py (original)
+++ dists/sid/linux-2.6/debian/bin/gencontrol.py Wed Apr 5 08:57:00 2006
@@ -5,6 +5,11 @@
from debian_linux.debian import *
class gencontrol(debian_linux.gencontrol.gencontrol):
+ def __init__(self):
+ super(gencontrol, self).__init__()
+ self.changelog = read_changelog()
+ self.version, self.abiname, self.changelog_vars = self.process_changelog({})
+
def do_main_setup(self, vars, makeflags):
vars.update(self.config['image',])
Modified: dists/sid/linux-2.6/debian/lib/python/debian_linux/config.py
==============================================================================
--- dists/sid/linux-2.6/debian/lib/python/debian_linux/config.py (original)
+++ dists/sid/linux-2.6/debian/lib/python/debian_linux/config.py Wed Apr 5 08:57:00 2006
@@ -1,6 +1,9 @@
import os, os.path, re, sys, textwrap, ConfigParser
-__all__ = 'config_reader',
+__all__ = [
+ 'config_parser',
+ 'config_reader',
+]
_marker = object()
Modified: dists/sid/linux-2.6/debian/lib/python/debian_linux/gencontrol.py
==============================================================================
--- dists/sid/linux-2.6/debian/lib/python/debian_linux/gencontrol.py (original)
+++ dists/sid/linux-2.6/debian/lib/python/debian_linux/gencontrol.py Wed Apr 5 08:57:00 2006
@@ -15,10 +15,8 @@
makefile_targets = ('binary-arch', 'build', 'setup', 'source')
def __init__(self, underlay = None):
- self.changelog = read_changelog()
self.config = config_reader([underlay, "debian/arch"])
self.templates = templates()
- self.version, self.abiname, self.changelog_vars = self.process_changelog({})
def __call__(self):
packages = packages_list()
@@ -43,6 +41,7 @@
'SOURCEVERSION': self.version['source'],
'UPSTREAMVERSION': self.version['upstream'],
'ABINAME': self.abiname,
+ # TODO: Don't read this here, this is linux-2.6 specific
'REVISIONS': ' '.join([i['Version']['debian'] for i in self.changelog[::-1]]),
}
@@ -203,6 +202,7 @@
def do_flavour_packages(self, packages, makefile, arch, subarch, flavour, vars, makeflags, extra):
pass
+ # TODO: Move away, linux-2.6 specific; unify with modules process_config_version
def process_changelog(self, in_vars):
ret = [None, None, None]
ret[0] = version = self.changelog[0]['Version']
Modified: dists/sid/linux-2.6/debian/modules/gencontrol.py
==============================================================================
--- dists/sid/linux-2.6/debian/modules/gencontrol.py (original)
+++ dists/sid/linux-2.6/debian/modules/gencontrol.py Wed Apr 5 08:57:00 2006
@@ -2,15 +2,27 @@
import sys
sys.path.append(sys.path[0] + "/../lib/python")
import debian_linux.gencontrol
+from debian_linux.config import *
from debian_linux.debian import *
class gencontrol(debian_linux.gencontrol.gencontrol):
+ # TODO: workaround
+ changelog = []
+
+ def __init__(self, config):
+ super(gencontrol, self).__init__(config)
+ self.config_version = config_parser({}, [sys.path[0] + "/../version"])
+ self.version, self.abiname, self.changelog_vars = self.process_config_version()
+
def do_main_packages(self, packages):
vars = self.changelog_vars
main = self.templates["control.main"]
packages.extend(self.process_packages(main, vars))
+ # TODO
+ l1 = ['linux-support-%s%s' % (self.version['upstream'], self.abiname)]
+ packages['source']['Build-Depends'].extend(l1)
l = ['linux-headers-%s%s-all-%s [%s]' % (self.version['upstream'], self.abiname, arch, arch) for arch in self.config['base',]['arches']]
packages['source']['Build-Depends'].extend(l)
@@ -41,5 +53,15 @@
makefile.append(("build-%s-%s-%s-real:" % (arch, subarch, flavour), cmds_build))
makefile.append(("setup-%s-%s-%s-real:" % (arch, subarch, flavour), cmds_setup))
+ def process_config_version(self):
+ # TODO: unify with process_changelog
+ vars = self.config_version['version',]
+ version = parse_version(vars['source'])
+ vars['upstreamversion'] = version['upstream']
+ vars['version'] = version['version']
+ vars['source_upstream'] = version['source_upstream']
+ vars['major'] = version['major']
+ return version, vars['abiname'], vars
+
if __name__ == '__main__':
gencontrol(sys.path[0] + "/../arch")()
Modified: dists/sid/linux-2.6/debian/rules.real
==============================================================================
--- dists/sid/linux-2.6/debian/rules.real (original)
+++ dists/sid/linux-2.6/debian/rules.real Wed Apr 5 08:57:00 2006
@@ -310,12 +310,15 @@
install-support: PACKAGE_NAME = linux-support-$(UPSTREAMVERSION)$(ABINAME)
install-support: DH_OPTIONS = -p$(PACKAGE_NAME)
+install-support: PACKAGE_DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
install-support:
dh_testdir
dh_testroot
+ dh_clean -k -d
chmod a+x debian/modules/gencontrol.py
dh_install debian/arch debian/lib debian/modules /usr/src/$(PACKAGE_NAME)
dh_python -V 2.4 /usr/src/$(PACKAGE_NAME)/lib/python
+ echo -e "[version]\nsource: $(SOURCEVERSION)\nabiname: $(ABINAME)" > $(PACKAGE_DIR)/usr/src/$(PACKAGE_NAME)/version
$(MAKE) -f debian/rules.real install-base
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): REAL_VERSION = $(UPSTREAMVERSION)$(ABINAME)$(LOCALVERSION)
More information about the Kernel-svn-changes
mailing list