* debian/bin/genorig.py, debian/lib/python/debian_linux/abi.py,
debian/lib/python/debian_linux/debian.py, debian/lib/python/debian_linux/patches.py, - Support Python 3. - Use six if necessary. * debian/templates/control.main.in, debian/templates/control.source.in: Depend on python-six. svn path=/dists/trunk/linux/; revision=20946
This commit is contained in:
parent
47b841047d
commit
929894f687
|
@ -101,7 +101,7 @@ class Main(object):
|
||||||
def debian_patch(self):
|
def debian_patch(self):
|
||||||
name = "orig"
|
name = "orig"
|
||||||
self.log("Patching source with debian patch (series %s)\n" % name)
|
self.log("Patching source with debian patch (series %s)\n" % name)
|
||||||
fp = file("debian/patches/series-" + name)
|
fp = open("debian/patches/series-" + name)
|
||||||
series = PatchSeries(name, "debian/patches", fp)
|
series = PatchSeries(name, "debian/patches", fp)
|
||||||
series(dir=os.path.join(self.dir, self.orig))
|
series(dir=os.path.join(self.dir, self.orig))
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ class Main(object):
|
||||||
try:
|
try:
|
||||||
if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', ' '.join(cmdline)]):
|
if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', ' '.join(cmdline)]):
|
||||||
raise RuntimeError("Can't patch source")
|
raise RuntimeError("Can't patch source")
|
||||||
os.chmod(out, 0644)
|
os.chmod(out, 0o644)
|
||||||
except:
|
except:
|
||||||
try:
|
try:
|
||||||
os.unlink(out)
|
os.unlink(out)
|
||||||
|
|
|
@ -37,8 +37,6 @@ class Symbols(dict):
|
||||||
self[name] = Symbol(name, module, version, export)
|
self[name] = Symbol(name, module, version, export)
|
||||||
|
|
||||||
def write(self, file):
|
def write(self, file):
|
||||||
symbols = self.values()
|
for s in sorted(self.values(), key=lambda i: i.name):
|
||||||
symbols.sort(key=lambda i: i.name)
|
|
||||||
for s in symbols:
|
|
||||||
file.write("%s %s %s %s\n" %
|
file.write("%s %s %s %s\n" %
|
||||||
(s.version, s.name, s.module, s.export))
|
(s.version, s.name, s.module, s.export))
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import collections
|
import collections
|
||||||
import itertools
|
import itertools
|
||||||
import os.path
|
import os.path
|
||||||
|
import six
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from . import utils
|
from . import utils
|
||||||
|
@ -35,7 +36,10 @@ class Changelog(list):
|
||||||
def __init__(self, dir='', version=None):
|
def __init__(self, dir='', version=None):
|
||||||
if version is None:
|
if version is None:
|
||||||
version = Version
|
version = Version
|
||||||
f = file(os.path.join(dir, "debian/changelog"))
|
if six.PY3:
|
||||||
|
f = open(os.path.join(dir, "debian/changelog"), encoding="UTF-8")
|
||||||
|
else:
|
||||||
|
f = open(os.path.join(dir, "debian/changelog"))
|
||||||
while True:
|
while True:
|
||||||
line = f.readline()
|
line = f.readline()
|
||||||
if not line:
|
if not line:
|
||||||
|
@ -53,7 +57,7 @@ class Changelog(list):
|
||||||
|
|
||||||
|
|
||||||
class Version(object):
|
class Version(object):
|
||||||
_version_rules = ur"""
|
_version_rules = r"""
|
||||||
^
|
^
|
||||||
(?:
|
(?:
|
||||||
(?P<epoch>
|
(?P<epoch>
|
||||||
|
@ -108,7 +112,7 @@ $
|
||||||
|
|
||||||
|
|
||||||
class VersionLinux(Version):
|
class VersionLinux(Version):
|
||||||
_version_linux_rules = ur"""
|
_version_linux_rules = r"""
|
||||||
^
|
^
|
||||||
(?P<version>
|
(?P<version>
|
||||||
\d+\.\d+
|
\d+\.\d+
|
||||||
|
@ -338,7 +342,7 @@ class PackageRelationEntry(object):
|
||||||
OP_GT: OP_LE,
|
OP_GT: OP_LE,
|
||||||
}
|
}
|
||||||
|
|
||||||
operators_text = dict([(b, a) for a, b in operators.iteritems()])
|
operators_text = dict((b, a) for a, b in operators.items())
|
||||||
|
|
||||||
__slots__ = '_op',
|
__slots__ = '_op',
|
||||||
|
|
||||||
|
@ -387,14 +391,14 @@ class PackageRelationEntry(object):
|
||||||
|
|
||||||
class Package(dict):
|
class Package(dict):
|
||||||
_fields = collections.OrderedDict((
|
_fields = collections.OrderedDict((
|
||||||
('Package', unicode),
|
('Package', six.text_type),
|
||||||
('Source', unicode),
|
('Source', six.text_type),
|
||||||
('Architecture', PackageArchitecture),
|
('Architecture', PackageArchitecture),
|
||||||
('Section', unicode),
|
('Section', six.text_type),
|
||||||
('Priority', unicode),
|
('Priority', six.text_type),
|
||||||
('Maintainer', unicode),
|
('Maintainer', six.text_type),
|
||||||
('Uploaders', unicode),
|
('Uploaders', six.text_type),
|
||||||
('Standards-Version', unicode),
|
('Standards-Version', six.text_type),
|
||||||
('Build-Depends', PackageRelation),
|
('Build-Depends', PackageRelation),
|
||||||
('Build-Depends-Indep', PackageRelation),
|
('Build-Depends-Indep', PackageRelation),
|
||||||
('Provides', PackageRelation),
|
('Provides', PackageRelation),
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
@ -23,7 +25,7 @@ class Operation(object):
|
||||||
s = "OK"
|
s = "OK"
|
||||||
else:
|
else:
|
||||||
s = "FAIL"
|
s = "FAIL"
|
||||||
print """ (%s) %-4s %s""" % (self.operation, s, self.name)
|
print(""" (%s) %-4s %s""" % (self.operation, s, self.name))
|
||||||
|
|
||||||
def do(self, dir):
|
def do(self, dir):
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
@ -71,7 +73,7 @@ class SubOperation(Operation):
|
||||||
s = "OK"
|
s = "OK"
|
||||||
else:
|
else:
|
||||||
s = "FAIL"
|
s = "FAIL"
|
||||||
print """ %-10s %-4s %s""" % ('(%s)' % self.operation, s, self.name)
|
print(""" %-10s %-4s %s""" % ('(%s)' % self.operation, s, self.name))
|
||||||
|
|
||||||
|
|
||||||
class SubOperationFilesRemove(SubOperation):
|
class SubOperationFilesRemove(SubOperation):
|
||||||
|
@ -164,7 +166,7 @@ class PatchSeries(list):
|
||||||
|
|
||||||
if operation in self.operations:
|
if operation in self.operations:
|
||||||
f = os.path.join(self.root, filename)
|
f = os.path.join(self.root, filename)
|
||||||
for suffix, cls in (('', file), ('.bz2', BZ2File), ('.gz', GzipFile)):
|
for suffix, cls in (('', open), ('.bz2', BZ2File), ('.gz', GzipFile)):
|
||||||
f1 = f + suffix
|
f1 = f + suffix
|
||||||
if os.path.exists(f1):
|
if os.path.exists(f1):
|
||||||
# Must copy current bindings into the lambda-function
|
# Must copy current bindings into the lambda-function
|
||||||
|
|
|
@ -46,7 +46,7 @@ Description: Linux kernel API manual pages for version @version@
|
||||||
Package: linux-support-@abiname@
|
Package: linux-support-@abiname@
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Section: devel
|
Section: devel
|
||||||
Depends: ${python:Depends}, ${misc:Depends}
|
Depends: ${python:Depends}, ${misc:Depends}, python-six
|
||||||
Multi-Arch: foreign
|
Multi-Arch: foreign
|
||||||
Description: Support files for Linux @upstreamversion@
|
Description: Support files for Linux @upstreamversion@
|
||||||
This package provides support files for the Linux kernel build,
|
This package provides support files for the Linux kernel build,
|
||||||
|
|
|
@ -3,7 +3,7 @@ Priority: optional
|
||||||
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
|
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
|
||||||
Uploaders: Bastian Blank <waldi@debian.org>, Frederik Schüler <fs@debian.org>, maximilian attems <maks@debian.org>, Ben Hutchings <ben@decadent.org.uk>
|
Uploaders: Bastian Blank <waldi@debian.org>, Frederik Schüler <fs@debian.org>, maximilian attems <maks@debian.org>, Ben Hutchings <ben@decadent.org.uk>
|
||||||
Standards-Version: 3.9.4
|
Standards-Version: 3.9.4
|
||||||
Build-Depends: debhelper (>> 7), cpio, kmod | module-init-tools, python (>= 2.7), lzma [armel], kernel-wedge (>= 2.84), quilt, patchutils, bc
|
Build-Depends: debhelper (>> 7), cpio, kmod | module-init-tools, python (>= 2.7), python-six, lzma [armel], kernel-wedge (>= 2.84), quilt, patchutils, bc
|
||||||
Build-Depends-Indep: xz-utils, xmlto
|
Build-Depends-Indep: xz-utils, xmlto
|
||||||
Vcs-Svn: svn://anonscm.debian.org/svn/kernel/dists/trunk/linux/
|
Vcs-Svn: svn://anonscm.debian.org/svn/kernel/dists/trunk/linux/
|
||||||
Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux/
|
Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux/
|
||||||
|
|
Loading…
Reference in New Issue