comparison bin/publishdebianpackages.py @ 578:bccd69dedbe5

shlex.split all config parameters that may contain a command Return the command as list and use @ operator for the variable in cmdexpand
author Bjoern Ricks <bricks@intevation.de>
date Sat, 03 Sep 2011 11:53:12 +0000
parents b7aad4cb58bb
children
comparison
equal deleted inserted replaced
577:7a9841e4958f 578:bccd69dedbe5
27 from treepkg.info.status import TreepkgInfo 27 from treepkg.info.status import TreepkgInfo
28 from treepkg.info.data import Package 28 from treepkg.info.data import Package
29 from treepkg.info.data import CacheDb 29 from treepkg.info.data import CacheDb
30 30
31 config_desc = ["distribution", "section", "num_newest", 31 config_desc = ["distribution", "section", "num_newest",
32 "build_user", "build_host", "build_listpackages", 32 "build_user", "build_host",
33 ("build_listpackages", shlex.split),
33 "publish_user", "publish_host", 34 "publish_user", "publish_host",
34 ("architectures", shlex.split, "armel i386 source"), 35 ("architectures", shlex.split, "armel i386 source"),
35 ("after_upload_hook", shlex.split, ""), 36 ("after_upload_hook", shlex.split, ""),
36 ("after_copy_hook", shlex.split, ""), 37 ("after_copy_hook", shlex.split, ""),
37 ("publish_packages", convert_bool, "True"), 38 ("publish_packages", convert_bool, "True"),
74 return parser.parse_args() 75 return parser.parse_args()
75 76
76 def get_treepkg_info(variables): 77 def get_treepkg_info(variables):
77 runremote = prefix_for_remote_command(variables["build_user"], 78 runremote = prefix_for_remote_command(variables["build_user"],
78 variables["build_host"]) 79 variables["build_host"])
79 xml = capture_stdout(cmdexpand("@runremote $build_listpackages" 80 xml = capture_stdout(cmdexpand("@runremote @build_listpackages"
80 " --newest=$num_newest" 81 " --newest=$num_newest"
81 " --only-successful", 82 " --only-successful",
82 runremote=runremote, 83 runremote=runremote,
83 **variables)) 84 **variables))
84 return TreepkgInfo.fromxml(xml) 85 return TreepkgInfo.fromxml(xml)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)