summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlav Vitters <olav@vitters.nl>2020-04-21 20:34:44 +0200
committerOlav Vitters <olav@vitters.nl>2020-04-21 20:34:44 +0200
commit53c85def533fd854dfca29f07cc8f084c5008406 (patch)
treecd61b7af7ebc43d0e9dcc9b450f3e510cdbdb6df
parentf586ee2445bfb28398a5be1ec57e60fc37fa84d9 (diff)
downloadmgagnome-53c85def533fd854dfca29f07cc8f084c5008406.tar
mgagnome-53c85def533fd854dfca29f07cc8f084c5008406.tar.gz
mgagnome-53c85def533fd854dfca29f07cc8f084c5008406.tar.bz2
mgagnome-53c85def533fd854dfca29f07cc8f084c5008406.tar.xz
mgagnome-53c85def533fd854dfca29f07cc8f084c5008406.zip
add command line argument to change the package root
-rwxr-xr-xmgagnome8
1 files changed, 6 insertions, 2 deletions
diff --git a/mgagnome b/mgagnome
index 224b69c..29253c0 100755
--- a/mgagnome
+++ b/mgagnome
@@ -1058,6 +1058,7 @@ class Downstream(object):
re_file = re.compile(r'^(?P<module>.*)[_-](?:(?P<oldversion>([0-9]+[\.])*[0-9]+)-)?(?P<version>([0-9]+[\.\-])*[0-9]+)\.(?P<format>(?:tar\.|diff\.)?[a-z][a-z0-9]*)$')
MEDIA="Core Release Source"
+ # PKGROOT will be overwritten (command line option)
PKGROOT='~/pkgs'
DISTRO=None
SECTION=None
@@ -1870,6 +1871,8 @@ def main():
parser.add_argument("-l", "--limit", type=argparse.FileType('r', 0),
dest="limit_upstream", metavar="FILE",
help="File containing upstream names")
+ parser.add_argument("-p", "--root", action="store", dest="PKGROOT",
+ help="Package root directory")
parser.add_argument("-d", "--distro", action="store", dest="distro",
help="Distribution release")
parser.add_argument("--debug", action="store_true", dest="debug",
@@ -1881,7 +1884,7 @@ def main():
subparser.add_argument("-s", "--submit", action="store_true", dest="submit",
help="Increase version for stable upgrades and submit")
subparser.set_defaults(
- func=cmd_check_latest, submit=False, debug=False
+ func=cmd_check_latest, submit=False, debug=False, PKGROOT="~/pkgs"
)
subparser = subparsers.add_parser('check-prep', help='check prep phase')
@@ -2018,8 +2021,9 @@ def main():
if not hasattr(options, 'submit'):
options.submit = not options.distro
+ Downstream.PKGROOT=options.PKGROOT
if options.distro:
- Downstream.PKGROOT = os.path.join('~/pkgs', options.distro)
+ Downstream.PKGROOT = os.path.join(options.PKGROOT, options.distro)
Downstream.MEDIA = "Core Release {0} Source,Core {0} Updates Source,Core {0} Updates Testing Source".format(options.distro)
Downstream.DISTRO = options.distro