Mercurial > treepkg
comparison recipes/gnupg/base.py @ 327:f5282057838a
Revisions are now handled as strings
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 17 Mar 2010 13:42:42 +0000 |
parents | 98ffe5f3863b |
children | 3a83cb3c6504 |
comparison
equal
deleted
inserted
replaced
326:23be5ab5bc7c | 327:f5282057838a |
---|---|
42 | 42 |
43 raise RuntimeError("Could not determine the version number from %s" | 43 raise RuntimeError("Could not determine the version number from %s" |
44 % filename) | 44 % filename) |
45 | 45 |
46 def determine_package_version(self, directory): | 46 def determine_package_version(self, directory): |
47 return "%s+svn%d" % (self.orig_source_version(directory), self.revision) | 47 return "%s+svn%s" % (self.orig_source_version(directory), self.revision) |
48 | 48 |
49 def do_package(self): | 49 def do_package(self): |
50 pkgbaseversion, pkgbasedir = self.export_sources() | 50 pkgbaseversion, pkgbasedir = self.export_sources() |
51 | 51 |
52 run.call(cmdexpand("/bin/sh autogen.sh"), cwd=pkgbasedir, | 52 run.call(cmdexpand("/bin/sh autogen.sh"), cwd=pkgbasedir, |
57 # file. autogen.sh normally determines it from svn, but here it | 57 # file. autogen.sh normally determines it from svn, but here it |
58 # ran on a copy that did not include the .svn subdirectories and | 58 # ran on a copy that did not include the .svn subdirectories and |
59 # thus could not find the svn revision. | 59 # thus could not find the svn revision. |
60 treepkg.util.replace_in_file(os.path.join(pkgbasedir, "configure"), | 60 treepkg.util.replace_in_file(os.path.join(pkgbasedir, "configure"), |
61 re.escape(orig_version) + "-svn0", | 61 re.escape(orig_version) + "-svn0", |
62 orig_version + "-svn%d" % self.revision) | 62 orig_version + "-svn%s" % self.revision) |
63 | 63 |
64 pkgbasename = self.pkg_basename + "_" + pkgbaseversion | 64 pkgbasename = self.pkg_basename + "_" + pkgbaseversion |
65 origtargz = os.path.join(self.work_dir, | 65 origtargz = os.path.join(self.work_dir, |
66 pkgbasename + ".orig.tar.gz") | 66 pkgbasename + ".orig.tar.gz") |
67 self.create_tarball(origtargz, self.work_dir, | 67 self.create_tarball(origtargz, self.work_dir, |
68 os.path.basename(pkgbasedir)) | 68 os.path.basename(pkgbasedir)) |
69 | 69 |
70 changemsg = ("Update to SVN rev. %d" % (self.revision,)) | 70 changemsg = ("Update to SVN rev. %s" % (self.revision,)) |
71 self.copy_debian_directory(pkgbasedir, pkgbaseversion, | 71 self.copy_debian_directory(pkgbasedir, pkgbaseversion, |
72 changemsg) | 72 changemsg) |
73 | 73 |
74 self.create_source_package(pkgbasedir, origtargz) | 74 self.create_source_package(pkgbasedir, origtargz) |
75 self.move_source_package(pkgbasename) | 75 self.move_source_package(pkgbasename) |
179 | 179 |
180 def do_package(self): | 180 def do_package(self): |
181 self.create_original_tarball() | 181 self.create_original_tarball() |
182 orig_dir = self.create_orig_dir() | 182 orig_dir = self.create_orig_dir() |
183 | 183 |
184 changemsg = ("Update to SVN rev. %d" % (self.revision,)) | 184 changemsg = ("Update to SVN rev. %s" % (self.revision,)) |
185 self.copy_debian_directory(orig_dir, self.pkgbaseversion, changemsg) | 185 self.copy_debian_directory(orig_dir, self.pkgbaseversion, changemsg) |
186 | 186 |
187 self.create_source_package(orig_dir, self.origtargz) | 187 self.create_source_package(orig_dir, self.origtargz) |
188 self.move_source_package(self.pkgbasename) | 188 self.move_source_package(self.pkgbasename) |
189 | 189 |