* 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):
|
||||
name = "orig"
|
||||
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(dir=os.path.join(self.dir, self.orig))
|
||||
|
||||
|
@ -121,7 +121,7 @@ class Main(object):
|
|||
try:
|
||||
if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', ' '.join(cmdline)]):
|
||||
raise RuntimeError("Can't patch source")
|
||||
os.chmod(out, 0644)
|
||||
os.chmod(out, 0o644)
|
||||
except:
|
||||
try:
|
||||
os.unlink(out)
|
||||
|
|
|
@ -37,8 +37,6 @@ class Symbols(dict):
|
|||
self[name] = Symbol(name, module, version, export)
|
||||
|
||||
def write(self, file):
|
||||
symbols = self.values()
|
||||
symbols.sort(key=lambda i: i.name)
|
||||
for s in symbols:
|
||||
for s in sorted(self.values(), key=lambda i: i.name):
|
||||
file.write("%s %s %s %s\n" %
|
||||
(s.version, s.name, s.module, s.export))
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import collections
|
||||
import itertools
|
||||
import os.path
|
||||
import six
|
||||
import re
|
||||
|
||||
from . import utils
|
||||
|
@ -35,7 +36,10 @@ class Changelog(list):
|
|||
def __init__(self, dir='', version=None):
|
||||
if version is None:
|
||||
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:
|
||||
line = f.readline()
|
||||
if not line:
|
||||
|
@ -53,7 +57,7 @@ class Changelog(list):
|
|||
|
||||
|
||||
class Version(object):
|
||||
_version_rules = ur"""
|
||||
_version_rules = r"""
|
||||
^
|
||||
(?:
|
||||
(?P<epoch>
|
||||
|
@ -108,7 +112,7 @@ $
|
|||
|
||||
|
||||
class VersionLinux(Version):
|
||||
_version_linux_rules = ur"""
|
||||
_version_linux_rules = r"""
|
||||
^
|
||||
(?P<version>
|
||||
\d+\.\d+
|
||||
|
@ -338,7 +342,7 @@ class PackageRelationEntry(object):
|
|||
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',
|
||||
|
||||
|
@ -387,14 +391,14 @@ class PackageRelationEntry(object):
|
|||
|
||||
class Package(dict):
|
||||
_fields = collections.OrderedDict((
|
||||
('Package', unicode),
|
||||
('Source', unicode),
|
||||
('Package', six.text_type),
|
||||
('Source', six.text_type),
|
||||
('Architecture', PackageArchitecture),
|
||||
('Section', unicode),
|
||||
('Priority', unicode),
|
||||
('Maintainer', unicode),
|
||||
('Uploaders', unicode),
|
||||
('Standards-Version', unicode),
|
||||
('Section', six.text_type),
|
||||
('Priority', six.text_type),
|
||||
('Maintainer', six.text_type),
|
||||
('Uploaders', six.text_type),
|
||||
('Standards-Version', six.text_type),
|
||||
('Build-Depends', PackageRelation),
|
||||
('Build-Depends-Indep', PackageRelation),
|
||||
('Provides', PackageRelation),
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import print_function
|
||||
|
||||
import glob
|
||||
import os
|
||||
import shutil
|
||||
|
@ -23,7 +25,7 @@ class Operation(object):
|
|||
s = "OK"
|
||||
else:
|
||||
s = "FAIL"
|
||||
print """ (%s) %-4s %s""" % (self.operation, s, self.name)
|
||||
print(""" (%s) %-4s %s""" % (self.operation, s, self.name))
|
||||
|
||||
def do(self, dir):
|
||||
raise NotImplementedError
|
||||
|
@ -71,7 +73,7 @@ class SubOperation(Operation):
|
|||
s = "OK"
|
||||
else:
|
||||
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):
|
||||
|
@ -164,7 +166,7 @@ class PatchSeries(list):
|
|||
|
||||
if operation in self.operations:
|
||||
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
|
||||
if os.path.exists(f1):
|
||||
# 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@
|
||||
Architecture: all
|
||||
Section: devel
|
||||
Depends: ${python:Depends}, ${misc:Depends}
|
||||
Depends: ${python:Depends}, ${misc:Depends}, python-six
|
||||
Multi-Arch: foreign
|
||||
Description: Support files for Linux @upstreamversion@
|
||||
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>
|
||||
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
|
||||
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
|
||||
Vcs-Svn: svn://anonscm.debian.org/svn/kernel/dists/trunk/linux/
|
||||
Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux/
|
||||
|
|
Loading…
Reference in New Issue