Mercurial > treepkg
annotate bin/publishpackages.py @ 250:b3f9cc956acc
Make the Status class usable without a filename and provide methods to
(de-)serialize to and from memory to make writing tests easier.
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Thu, 09 Apr 2009 18:20:04 +0000 |
parents | a3f106580525 |
children | 8052aabada8b |
rev | line source |
---|---|
89
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
1 #! /usr/bin/python2.4 |
247
55337021fe5b
Mention rules revision in text of --revision parameter of bin/publishpackages.py
Bernhard Herzog <bh@intevation.de>
parents:
200
diff
changeset
|
2 # Copyright (C) 2007, 2008, 2009 by Intevation GmbH |
89
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
3 # Authors: |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
4 # Bernhard Herzog <bh@intevation.de> |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
5 # |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
6 # This program is free software under the GPL (>=v2) |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
7 # Read the file COPYING coming with the software for details. |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
8 |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
9 """Publishes selected packages created by treepkg""" |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
10 |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
11 import sys |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
12 import os |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
13 import shutil |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
14 from optparse import OptionParser |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
15 from ConfigParser import SafeConfigParser |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
16 |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
17 import treepkgcmd |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
18 from treepkg.readconfig import read_config_section |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
19 from treepkg.run import call, capture_output |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
20 from treepkg.cmdexpand import cmdexpand |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
21 from treepkg.util import ensure_directory, listdir_abs |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
22 |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
23 |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
24 def remove_trailing_slashes(s): |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
25 return s.rstrip("/") |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
26 |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
27 def expand_filename(filename): |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
28 """ |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
29 Applies os.path.expanduser and os.path.expandvars to filename |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
30 """ |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
31 return os.path.expandvars(os.path.expanduser(filename)) |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
32 |
249
a3f106580525
Add config settings "distribution" and "section" so that they don't have
Bernhard Herzog <bh@intevation.de>
parents:
247
diff
changeset
|
33 config_desc = ["distribution", "section", |
a3f106580525
Add config settings "distribution" and "section" so that they don't have
Bernhard Herzog <bh@intevation.de>
parents:
247
diff
changeset
|
34 "build_user", "build_host", "build_listpackages", |
89
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
35 "publish_user", "publish_host", "publish_apt_archive_update", |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
36 ("publish_dir", remove_trailing_slashes), |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
37 ("cachedir", |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
38 lambda s: expand_filename(remove_trailing_slashes(s)))] |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
39 |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
40 def read_config(filename): |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
41 parser = SafeConfigParser() |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
42 parser.read([filename]) |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
43 return read_config_section(parser, "publishpackages", config_desc) |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
44 |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
45 def parse_commandline(): |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
46 parser = OptionParser() |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
47 parser.set_defaults(config_file=os.path.join(treepkgcmd.topdir, |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
48 "publishpackages.cfg")) |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
49 parser.add_option("--config-file", |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
50 help=("The configuration file." |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
51 " Default is publishpackages.cfg")) |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
52 parser.add_option("--revision", |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
53 help=("The revision whose files are to be published." |
247
55337021fe5b
Mention rules revision in text of --revision parameter of bin/publishpackages.py
Bernhard Herzog <bh@intevation.de>
parents:
200
diff
changeset
|
54 " If not given, the latest revision is used" |
55337021fe5b
Mention rules revision in text of --revision parameter of bin/publishpackages.py
Bernhard Herzog <bh@intevation.de>
parents:
200
diff
changeset
|
55 " The value may be given as REV-RULESREV to specify" |
55337021fe5b
Mention rules revision in text of --revision parameter of bin/publishpackages.py
Bernhard Herzog <bh@intevation.de>
parents:
200
diff
changeset
|
56 " both the main source revision and the revision of" |
55337021fe5b
Mention rules revision in text of --revision parameter of bin/publishpackages.py
Bernhard Herzog <bh@intevation.de>
parents:
200
diff
changeset
|
57 " the packaging rules")) |
89
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
58 parser.add_option("--dist", |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
59 help=("The debian distribution name to use on" |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
60 " the publishing system")) |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
61 parser.add_option("--section", |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
62 help=("The debian distribution section name to use on" |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
63 " the publishing system")) |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
64 parser.add_option("--track", |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
65 help=("The package track whose files are to be" |
200
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
66 " published. If not given, files of all tracks" |
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
67 " will be published")) |
89
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
68 return parser.parse_args() |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
69 |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
70 |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
71 def publish_packages_arch(variables, track, revision, dist, section, arch): |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
72 # create web-page on build host |
200
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
73 listpackages_vars = variables.copy() |
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
74 |
89
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
75 if arch == "source": |
200
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
76 listpackages_vars["pkgtype"] = "--source" |
89
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
77 else: |
200
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
78 listpackages_vars["pkgtype"] = "--binary" |
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
79 |
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
80 if track: |
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
81 listpackages_vars["track"] = ["--track", track] |
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
82 else: |
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
83 listpackages_vars["track"] = [] |
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
84 |
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
85 if revision: |
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
86 listpackages_vars["revision"] = ["--revision", revision] |
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
87 else: |
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
88 listpackages_vars["revision"] = [] |
89
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
89 |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
90 files = capture_output(cmdexpand("ssh $build_user$@$build_host" |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
91 " $build_listpackages" |
200
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
92 " @track @revision $pkgtype", |
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
93 **listpackages_vars)).strip().split("\n") |
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
94 |
89
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
95 # scp the packages to the cache dir |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
96 cachedir = variables["cachedir"] |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
97 shutil.rmtree(cachedir, ignore_errors=True) |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
98 ensure_directory(cachedir) |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
99 userhost = "%(build_user)s@%(build_host)s:" % variables |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
100 call(cmdexpand("scp @files $cachedir/", |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
101 files = [userhost + filename for filename in files], |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
102 **variables)) |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
103 |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
104 # copy the packages to the remote publishing host. Create the |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
105 # destination directory if it doesn't exist yet. |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
106 destdir = os.path.join(variables["publish_dir"], dist, section, arch) |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
107 call(cmdexpand("ssh $publish_user$@$publish_host mkdir --parents $destdir", |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
108 destdir=destdir, **variables)) |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
109 call(cmdexpand("scp @files $publish_user$@$publish_host:$destdir", |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
110 files=listdir_abs(cachedir), destdir=destdir, |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
111 **variables)) |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
112 |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
113 |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
114 def publish_packages(config_filename, track, revision, dist, section): |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
115 config = read_config(config_filename) |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
116 |
249
a3f106580525
Add config settings "distribution" and "section" so that they don't have
Bernhard Herzog <bh@intevation.de>
parents:
247
diff
changeset
|
117 if dist is None: |
a3f106580525
Add config settings "distribution" and "section" so that they don't have
Bernhard Herzog <bh@intevation.de>
parents:
247
diff
changeset
|
118 dist = config["distribution"] |
a3f106580525
Add config settings "distribution" and "section" so that they don't have
Bernhard Herzog <bh@intevation.de>
parents:
247
diff
changeset
|
119 if section is None: |
a3f106580525
Add config settings "distribution" and "section" so that they don't have
Bernhard Herzog <bh@intevation.de>
parents:
247
diff
changeset
|
120 section = config["section"] |
a3f106580525
Add config settings "distribution" and "section" so that they don't have
Bernhard Herzog <bh@intevation.de>
parents:
247
diff
changeset
|
121 |
89
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
122 for arch in ["binary-i386", "source"]: |
200
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
123 publish_packages_arch(config, track, revision, dist, section, arch) |
89
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
124 |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
125 # update apt archive |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
126 call(cmdexpand("ssh $publish_user$@$publish_host" |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
127 " $publish_apt_archive_update", |
200
ce03e24f6d0f
publishpackages command: if --track is omitted, publish files of all tracks.
Bernhard Herzog <bh@intevation.de>
parents:
89
diff
changeset
|
128 **config)) |
89
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
129 |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
130 def main(): |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
131 options, args = parse_commandline() |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
132 publish_packages(options.config_file, options.track, options.revision, |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
133 options.dist, options.section) |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
134 |
3caf4a5ecbf0
Add scripts that help publish the packages produced by the tree packager
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
135 main() |