comparison bin/publishdebianpackages.py @ 423:855829a4a2db treepkg-status

check if upload hook is empty
author Bjoern Ricks <bricks@intevation.de>
date Tue, 27 Jul 2010 16:28:22 +0000
parents 7780bde2ec68
children a2ba58ffbfbe
comparison
equal deleted inserted replaced
422:7780bde2ec68 423:855829a4a2db
9 9
10 """Publishes selected packages created by treepkg""" 10 """Publishes selected packages created by treepkg"""
11 11
12 import os 12 import os
13 import os.path 13 import os.path
14 import re
14 import sys 15 import sys
15 import shlex 16 import shlex
16 17
17 from optparse import OptionParser 18 from optparse import OptionParser
18 from ConfigParser import SafeConfigParser 19 from ConfigParser import SafeConfigParser
24 from treepkg.publish import * 25 from treepkg.publish import *
25 from treepkg.util import md5sum 26 from treepkg.util import md5sum
26 from treepkg.info.status import TreepkgInfo 27 from treepkg.info.status import TreepkgInfo
27 from treepkg.info.data import Package 28 from treepkg.info.data import Package
28 from treepkg.info.data import CacheDb 29 from treepkg.info.data import CacheDb
30
31 EMPTY = re.compile(r'\s*')
29 32
30 config_desc = ["distribution", "section", "num_newest", 33 config_desc = ["distribution", "section", "num_newest",
31 "build_user", "build_host", "build_listpackages", 34 "build_user", "build_host", "build_listpackages",
32 "publish_user", "publish_host", 35 "publish_user", "publish_host",
33 ("architectures", shlex.split, "armel i386 source"), 36 ("architectures", shlex.split, "armel i386 source"),
228 architectures = config["architectures"] 231 architectures = config["architectures"]
229 copy_to_cachedir(config, track, revision, quiet, architectures) 232 copy_to_cachedir(config, track, revision, quiet, architectures)
230 copy_to_publishdir(config, dist, section, None, quiet) 233 copy_to_publishdir(config, dist, section, None, quiet)
231 234
232 # update apt archive 235 # update apt archive
233 if config["after_upload_hook"]: 236 if not EMPTY.match(config["after_upload_hook"]):
234 if not quiet: 237 if not quiet:
235 print "running after upload hook" 238 print "running after upload hook"
236 call(config["after_upload_hook"]) 239 call(config["after_upload_hook"])
237 240
238 def main(): 241 def main():
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)