diff options
author | 2010-08-04 14:29:44 +0200 | |
---|---|---|
committer | 2010-08-04 14:29:44 +0200 | |
commit | b1ef9f362188c5b82be0c7132c47887d3d813bd2 (patch) | |
tree | 0e5e50619d00be2abdfdf9c44d4ff45ef7e71ea0 | |
parent | Fix a bug where drivers don't exit because of a filled buffer (diff) | |
download | g-cran-b1ef9f362188c5b82be0c7132c47887d3d813bd2.tar.gz g-cran-b1ef9f362188c5b82be0c7132c47887d3d813bd2.tar.bz2 g-cran-b1ef9f362188c5b82be0c7132c47887d3d813bd2.zip |
Also accept package version for the 'package' action
-rw-r--r-- | g_common/g_common.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/g_common/g_common.py b/g_common/g_common.py index 33b7664..216ca06 100644 --- a/g_common/g_common.py +++ b/g_common/g_common.py @@ -161,11 +161,15 @@ def generate_tree(repo_location,generate_manifest,generate_metadata): return 0 #list package details, in PMS's format -def action_package(repo_location,package_name): +def action_package(repo_location,package_name,version): repo_conf=read_repo_config(repo_location) driver_conf=read_driver_config(repo_conf['driver']) - - return os.system(driver_conf['exec']+" "+repo_location+" package "+package_name) + + version_append='' + if version: + version_append=' '+version + + return os.system(driver_conf['exec']+" "+repo_location+" package "+package_name+version_append) #do one of the ebuild phases def exec_phase(repo_location,phase): @@ -223,7 +227,10 @@ def main(): print " * [version]" sys.exit(1) package_name=arguments[2] - return action_package(repo_location,package_name) + version=None + if len(arguments)>3: #version + version=arguments[3] + return action_package(repo_location,package_name,version) elif action=='usage' or action=='help': return usage() elif action in settings.PMS_PHASES: |