From ed7e5c1f6e91811645689618de6903e837cd0e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jani=20V=C3=A4limaa?= Date: Fri, 20 Feb 2015 21:30:36 +0200 Subject: Ignore 'mgarepo sync -c' and tell it's deprecated TODO: Completely remove -c switch from code. --- CHANGES | 2 ++ MgaRepo/commands/sync.py | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 4795b9a..fc7d0cc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +- ignore 'mgarepo sync -c' and tell it's deprecated + * 1.10.6 - s/cooker/cauldron/ thus fixing some stupid upload errors related to backports diff --git a/MgaRepo/commands/sync.py b/MgaRepo/commands/sync.py index 71f5510..54f5635 100644 --- a/MgaRepo/commands/sync.py +++ b/MgaRepo/commands/sync.py @@ -11,7 +11,6 @@ in the spec file. It will not commit the changes. Options: - -c Commit the changes, as in ci --dry-run Print results without changing the working copy --download -d Try to download the source files not found @@ -25,11 +24,17 @@ def parse_options(): parser = OptionParser(help=HELP) parser.add_option("--dry-run", dest="dryrun", default=False, action="store_true") + # TODO: + # Completely remove -c switch from code parser.add_option("-c", dest="commit", default=False, action="store_true") parser.add_option("-d", "--download", dest="download", default=False, action="store_true") opts, args = parser.parse_args() + # TODO: + # Completely remove -c switch from code + if opts.commit: + parser.error("Option -c is deprecated and should not be used anymore!") if len(args): opts.target = args[0] return opts -- cgit v1.2.1 From 34d3f7a14328c828cc2f9f79768ea9ba02946f9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jani=20V=C3=A4limaa?= Date: Fri, 7 Aug 2015 16:18:15 +0300 Subject: Version 1.10.7 --- CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES b/CHANGES index fc7d0cc..37c5267 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,4 @@ +* 1.10.7 - ignore 'mgarepo sync -c' and tell it's deprecated * 1.10.6 -- cgit v1.2.1 From c7b283c9d2d17324b19a2cb9fa1a128bf092c911 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Mon, 10 Aug 2015 06:59:45 +0200 Subject: Prefix svn info command with only LANGUAGE=C #73 --- MgaRepo/svn.py | 4 ++++ MgaRepo/util.py | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/MgaRepo/svn.py b/MgaRepo/svn.py index da3eee7..89de8f9 100644 --- a/MgaRepo/svn.py +++ b/MgaRepo/svn.py @@ -33,6 +33,10 @@ class SVN: svn_command = config.get("global", "svn-command", "svn") cmdstr = svn_command + " " + " ".join(args) try: + if args[0] == 'info': + kwargs['info'] = True + else: + kwargs['info'] = False return execcmd(cmdstr, **kwargs) except Error, e: msg = None diff --git a/MgaRepo/util.py b/MgaRepo/util.py index 62ac32e..54348d6 100644 --- a/MgaRepo/util.py +++ b/MgaRepo/util.py @@ -56,8 +56,11 @@ def execcmd(*cmd, **kwargs): status = os.system(cmdstr) output = "" else: - status, output = commands_getstatusoutput( - "LANG=C LANGUAGE=C LC_ALL=C "+cmdstr) + if kwargs.get('info'): + prefix='LANGUAGE=C ' + else: + prefix='LANG=C LANGUAGE=C LC_ALL=C ' + status, output = commands_getstatusoutput(prefix + cmdstr) verbose = config.getbool("global", "verbose", 0) if status != 0 and not kwargs.get("noerror"): if kwargs.get("cleanerr") and not verbose: -- cgit v1.2.1 From 3e3e90e699192df60eeafb2ec7a9e087aff97195 Mon Sep 17 00:00:00 2001 From: Olav Vitters Date: Thu, 8 Oct 2015 21:41:42 +0200 Subject: Make mgarepo ci -s work When only fetching the spec file, mgarepo still tried to retrieve the binaries. This resulted in an error message. Really only download the spec file. --- MgaRepo/rpmutil.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py index 325c0ce..53fb3b2 100644 --- a/MgaRepo/rpmutil.py +++ b/MgaRepo/rpmutil.py @@ -474,7 +474,8 @@ def checkout(pkgdirurl, path=None, revision=None, branch=None, distro=None, mirror.info(current, write=True) svn = SVN() svn.checkout(current, path, rev=revision, show=1) - binrepo.download_binaries(path) + if not spec: + binrepo.download_binaries(path) def getpkgtopdir(basedir=None): #FIXME this implementation doesn't work well with relative path names, -- cgit v1.2.1