comparison bin/publishdebianpackages.py @ 429:9cfa9f64387a treepkg-status

only rsync specified architectures from cachedir to publishdir
author Bjoern Ricks <bricks@intevation.de>
date Wed, 28 Jul 2010 11:38:00 +0000
parents 3d65b3176159
children 4aaf73a6225e
comparison
equal deleted inserted replaced
428:3d65b3176159 429:9cfa9f64387a
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
15 import sys 14 import sys
16 import shlex 15 import shlex
17 16
18 from optparse import OptionParser 17 from optparse import OptionParser
19 from ConfigParser import SafeConfigParser 18 from ConfigParser import SafeConfigParser
25 from treepkg.publish import * 24 from treepkg.publish import *
26 from treepkg.util import md5sum 25 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
31 EMPTY = re.compile(r'\s*')
32 29
33 config_desc = ["distribution", "section", "num_newest", 30 config_desc = ["distribution", "section", "num_newest",
34 "build_user", "build_host", "build_listpackages", 31 "build_user", "build_host", "build_listpackages",
35 "publish_user", "publish_host", 32 "publish_user", "publish_host",
36 ("architectures", shlex.split, "armel i386 source"), 33 ("architectures", shlex.split, "armel i386 source"),
228 dist = config["distribution"] 225 dist = config["distribution"]
229 if section is None: 226 if section is None:
230 section = config["section"] 227 section = config["section"]
231 228
232 architectures = config["architectures"] 229 architectures = config["architectures"]
233 allarchs = copy_to_cachedir(config, track, revision, quiet, architectures) 230 copy_to_cachedir(config, track, revision, quiet, architectures)
234 for arch in allarchs: 231 for arch in architectures:
235 copy_to_publishdir(config, dist, section, arch, quiet) 232 copy_arch_to_publishdir(config, dist, section, get_binary_arch(arch),
233 quiet)
236 234
237 # update apt archive 235 # update apt archive
238 if config["after_upload_hook"] and \ 236 if config["after_upload_hook"] and \
239 not EMPTY.match(config["after_upload_hook"]): 237 len((config["after_upload_hook"][0]).strip()) > 0:
240 if not quiet: 238 if not quiet:
241 print "running after upload hook" 239 print "running after upload hook"
242 call(config["after_upload_hook"]) 240 call(config["after_upload_hook"])
243 241
244 def main(): 242 def main():
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)