debian/bin/gencontrol.py:
Move some linux specific code from ebian/lib/python/debian_linux/gencontrol.py. svn path=/dists/trunk/linux-2.6/; revision=10254
This commit is contained in:
parent
6342f86067
commit
d899a4c6c6
|
@ -18,6 +18,10 @@ class Gencontrol(Base):
|
||||||
super(Gencontrol, self).do_main_setup(vars, makeflags, extra)
|
super(Gencontrol, self).do_main_setup(vars, makeflags, extra)
|
||||||
vars.update(self.config['image',])
|
vars.update(self.config['image',])
|
||||||
makeflags.update({
|
makeflags.update({
|
||||||
|
'MAJOR': self.version.linux_major,
|
||||||
|
'VERSION': self.version.linux_version,
|
||||||
|
'UPSTREAMVERSION': self.version.linux_upstream,
|
||||||
|
'ABINAME': self.abiname,
|
||||||
'SOURCEVERSION': self.version.complete,
|
'SOURCEVERSION': self.version.complete,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -262,7 +266,13 @@ class Gencontrol(Base):
|
||||||
self.abiname = ''
|
self.abiname = ''
|
||||||
else:
|
else:
|
||||||
self.abiname = '-%s' % self.config['abi',]['abiname']
|
self.abiname = '-%s' % self.config['abi',]['abiname']
|
||||||
self.vars = self.process_version_linux(self.version, self.abiname)
|
self.vars = {
|
||||||
|
'upstreamversion': self.version.linux_upstream,
|
||||||
|
'version': self.version.linux_version,
|
||||||
|
'source_upstream': self.version.upstream,
|
||||||
|
'major': self.version.linux_major,
|
||||||
|
'abiname': self.abiname,
|
||||||
|
}
|
||||||
self.config['version',] = {'source': self.version.complete, 'abiname': self.abiname}
|
self.config['version',] = {'source': self.version.complete, 'abiname': self.abiname}
|
||||||
|
|
||||||
def process_real_image(self, in_entry, relations, config, vars):
|
def process_real_image(self, in_entry, relations, config, vars):
|
||||||
|
|
|
@ -108,12 +108,7 @@ class Gencontrol(object):
|
||||||
self.do_arch(packages, makefile, arch, vars.copy(), makeflags.copy(), extra)
|
self.do_arch(packages, makefile, arch, vars.copy(), makeflags.copy(), extra)
|
||||||
|
|
||||||
def do_main_setup(self, vars, makeflags, extra):
|
def do_main_setup(self, vars, makeflags, extra):
|
||||||
makeflags.update({
|
pass
|
||||||
'MAJOR': self.version.linux_major,
|
|
||||||
'VERSION': self.version.linux_version,
|
|
||||||
'UPSTREAMVERSION': self.version.linux_upstream,
|
|
||||||
'ABINAME': self.abiname,
|
|
||||||
})
|
|
||||||
|
|
||||||
def do_main_makefile(self, makefile, makeflags, extra):
|
def do_main_makefile(self, makefile, makeflags, extra):
|
||||||
makefile.add('binary-indep', cmds = ["$(MAKE) -f debian/rules.real binary-indep %s" % makeflags])
|
makefile.add('binary-indep', cmds = ["$(MAKE) -f debian/rules.real binary-indep %s" % makeflags])
|
||||||
|
@ -280,15 +275,6 @@ class Gencontrol(object):
|
||||||
entries.append(self.process_package(i, vars))
|
entries.append(self.process_package(i, vars))
|
||||||
return entries
|
return entries
|
||||||
|
|
||||||
def process_version_linux(self, version, abiname):
|
|
||||||
return {
|
|
||||||
'upstreamversion': version.linux_upstream,
|
|
||||||
'version': version.linux_version,
|
|
||||||
'source_upstream': version.upstream,
|
|
||||||
'major': version.linux_major,
|
|
||||||
'abiname': abiname,
|
|
||||||
}
|
|
||||||
|
|
||||||
def substitute(self, s, vars):
|
def substitute(self, s, vars):
|
||||||
if isinstance(s, (list, tuple)):
|
if isinstance(s, (list, tuple)):
|
||||||
for i in xrange(len(s)):
|
for i in xrange(len(s)):
|
||||||
|
|
Loading…
Reference in New Issue