Mercurial > treepkg
comparison bin/publishdebianpackages.py @ 439:8e0c81870e5e treepkg-status
cleanup modules
fix test_info testcases
added testcases for remove_trailingslashes and expand_filename
author | Bjoern Ricks <bricks@intevation.de> |
---|---|
date | Fri, 06 Aug 2010 11:06:08 +0000 |
parents | 3a3cad8f6f60 |
children | 12f3642e1756 |
comparison
equal
deleted
inserted
replaced
438:3a3cad8f6f60 | 439:8e0c81870e5e |
---|---|
18 | 18 |
19 import treepkgcmd | 19 import treepkgcmd |
20 from treepkg.readconfig import read_config_section, convert_bool | 20 from treepkg.readconfig import read_config_section, convert_bool |
21 from treepkg.run import call, capture_output | 21 from treepkg.run import call, capture_output |
22 from treepkg.cmdexpand import cmdexpand | 22 from treepkg.cmdexpand import cmdexpand |
23 from treepkg.publish import copy_arch_to_publishdir, expand_filename, \ | 23 from treepkg.publish import copy_arch_to_publishdir, prefix_for_remote_command |
24 prefix_for_remote_command, remove_trailing_slashes | 24 |
25 | 25 from treepkg.util import md5sum, expand_filename, remove_trailing_slashes |
26 from treepkg.util import md5sum | |
27 from treepkg.info.status import TreepkgInfo | 26 from treepkg.info.status import TreepkgInfo |
28 from treepkg.info.data import Package | 27 from treepkg.info.data import Package |
29 from treepkg.info.data import CacheDb | 28 from treepkg.info.data import CacheDb |
30 | 29 |
31 config_desc = ["distribution", "section", "num_newest", | 30 config_desc = ["distribution", "section", "num_newest", |
80 " --newest=$num_newest" | 79 " --newest=$num_newest" |
81 " --only-successful", | 80 " --only-successful", |
82 runremote=runremote, | 81 runremote=runremote, |
83 **variables)) | 82 **variables)) |
84 return TreepkgInfo.fromxml(xml) | 83 return TreepkgInfo.fromxml(xml) |
85 | |
86 def get_binary_arch(arch): | |
87 if not arch is None and not arch.startswith("binary") and arch != "source": | |
88 arch = "binary-" + arch | |
89 return arch | |
90 | 84 |
91 def check_package_is_new(packagename, destdir, packagemd5sum): | 85 def check_package_is_new(packagename, destdir, packagemd5sum): |
92 destpackage = os.path.join(destdir, packagename) | 86 destpackage = os.path.join(destdir, packagename) |
93 if not os.path.isfile(destpackage): | 87 if not os.path.isfile(destpackage): |
94 return True | 88 return True |