debian/bin/genorig.py

- Adopt new Changelog structure.
- Use rmtree from shutil.

svn path=/dists/trunk/linux-2.6/; revision=8261
This commit is contained in:
Bastian Blank 2007-02-05 09:34:24 +00:00
parent d04348aed9
commit c783eb45dd
1 changed files with 6 additions and 7 deletions

13
debian/bin/genorig.py vendored
View File

@ -3,9 +3,8 @@
import sys
sys.path.append("debian/lib/python")
import os, os.path, re
from debian_linux.debian import read_changelog
from debian_linux.utils import rmtree
import os, os.path, re, shutil
from debian_linux.debian import Changelog
class main(object):
def __init__(self, input_tar, input_patch = None):
@ -14,9 +13,9 @@ class main(object):
self.input_tar = input_tar
self.input_patch = input_patch
changelog = read_changelog()[0]
source = changelog['Source']
version = changelog['Version']['linux']['source_upstream']
changelog = Changelog()[0]
source = changelog.source
version = changelog.version.upstream
self.orig = '%s-%s' % (source, version)
self.orig_tar = '%s_%s.orig.tar.gz' % (source, version)
@ -28,7 +27,7 @@ class main(object):
self.patch()
self.tar()
finally:
rmtree(self.dir)
shutil.rmtree(self.dir)
def extract(self):
self.log("Extracting tarball %s\n" % self.input_tar)