[kernel] r6809 - people/waldi/scripts/snapshot
Bastian Blank
waldi at costa.debian.org
Sat Jun 17 15:28:43 UTC 2006
Author: waldi
Date: Sat Jun 17 15:28:42 2006
New Revision: 6809
Modified:
people/waldi/scripts/snapshot/package.py
Log:
/people/waldi/scripts/snapshot/package.py: Update.
Modified: people/waldi/scripts/snapshot/package.py
==============================================================================
--- people/waldi/scripts/snapshot/package.py (original)
+++ people/waldi/scripts/snapshot/package.py Sat Jun 17 15:28:42 2006
@@ -131,7 +131,7 @@
def exec_svn(self, args):
self._exec("/usr/bin/svn", args)
-def package(path, dist):
+def package(path, dist, native = False):
checkout_dir = "checkout-" + path.replace('/', '_')
last_file = "last-" + path.replace('/', '_')
checkout_storage = repository_svn(checkout_dir, path)
@@ -174,19 +174,21 @@
version_debian = '.'.join(version_debian)
package_storage = checkout_storage.copy(package_dir, storage)
- package_storage._mk("gen/orig")
- try:
- os.unlink("gen/orig/%s" % package)
- except OSError: pass
- try:
- os.unlink("gen/%s" % package_orig_tar)
- except OSError: pass
- try:
- os.unlink("out/%s" % package_orig_tar)
- except OSError: pass
- os.symlink(package_orig_source, "gen/orig/%s" % package)
- os.symlink(package_orig_source_tar, "gen/%s" % package_orig_tar)
- os.symlink(package_orig_source_tar, "out/%s" % package_orig_tar)
+
+ if not native:
+ package_storage._mk("gen/orig")
+ try:
+ os.unlink("gen/orig/%s" % package)
+ except OSError: pass
+ try:
+ os.unlink("gen/%s" % package_orig_tar)
+ except OSError: pass
+ try:
+ os.unlink("out/%s" % package_orig_tar)
+ except OSError: pass
+ os.symlink(package_orig_source, "gen/orig/%s" % package)
+ os.symlink(package_orig_source_tar, "gen/%s" % package_orig_tar)
+ os.symlink(package_orig_source_tar, "out/%s" % package_orig_tar)
changelog = "%s/debian/changelog" % package_dir
changelog_text = file(changelog).read()
@@ -206,17 +208,28 @@
)
f.write(changelog_text)
del f
+
spawnv_chdir(os.P_WAIT, "debian/rules", ['debian/rules', 'debian/control'], package_dir)
- spawnv_chdir(os.P_WAIT, "debian/rules", ['debian/rules', 'orig'], package_dir)
+ if not native:
+ spawnv_chdir(os.P_WAIT, "debian/rules", ['debian/rules', 'orig'], package_dir)
- list = ['dpkg-buildpackage', '-kDAEE1CDC', '-S', '-i^(Documentation|arch|drivers|include)']
- if version_upstream != last_upstream:
- spawnv_chdir(os.P_WAIT, "dpkg-buildpackage", list + ['-sa'], package_dir)
+ list = ['dpkg-buildpackage', '-kDAEE1CDC', '-S']
+ if not native:
+ if version_upstream != last_upstream:
+ list.append('-sa')
+ else:
+ list.append('-sd')
+ spawnv_chdir(os.P_WAIT, "dpkg-buildpackage", list, package_dir)
+
+ suffixes = ['.dsc', '_source.changes']
+ if native:
+ suffixes.append('.tar.gz')
else:
- spawnv_chdir(os.P_WAIT, "dpkg-buildpackage", list + ['-sd'], package_dir)
+ suffixes.append('.diff.gz')
- for suffix in ('.diff.gz', '.dsc', '_source.changes'):
+ for suffix in suffixes:
prefix = '%s_%s-%s' % (package_name, package_version, version_debian)
+ print prefix, suffix
os.link("gen/%s%s" % (prefix, suffix), "out/%s%s" % (prefix, suffix))
os.unlink("gen/%s%s" % (prefix, suffix))
@@ -228,15 +241,16 @@
def main():
maps = {
- "dists/sid/linux-2.6": "kernel-dists-sid",
- "dists/trunk/linux-2.6": "kernel-dists-trunk",
+ "dists/sid/linux-2.6": {'dist': "kernel-dists-sid"},
+ "dists/trunk/linux-2.6": {'dist': "kernel-dists-trunk"},
+ "dists/trunk/linux-kbuild-2.6": {'dist': "kernel-dists-trunk"},
}
if len(sys.argv) > 1:
paths = sys.argv[1:]
else:
paths = maps.keys()
for path in paths:
- package(path, maps[path])
+ package(path, **maps[path])
if __name__ == '__main__':
os.chdir(base)
More information about the Kernel-svn-changes
mailing list