From 16d9ff072a55820cc45640f9ee9699bd6be6fca5 Mon Sep 17 00:00:00 2001 From: Olav Vitters Date: Tue, 8 Jul 2014 01:12:51 +0200 Subject: change --pkgconfig option to --convert, improve svn diff output --- mgagnome | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mgagnome b/mgagnome index 3f49275..0dca045 100755 --- a/mgagnome +++ b/mgagnome @@ -487,7 +487,7 @@ class SpecFile(object): def _revert_changes(self): """Revert uncommited changes made to spec file""" self._changes = [] - subprocess.check_call(["svn", "revert", "-R", os.path.join(self.path, '..')]) + subprocess.check_call(["svn", "revert", "-R", os.path.join(self.cwd, '..')]) def remove_patch(self, nr): nrs = [str(nr)] @@ -629,7 +629,7 @@ class SpecFile(object): def ensure_no_local_changes(self, force=False): # XXX - os.path.join is hackish - svn_diff_output = subprocess.check_output(["svn", "diff", os.path.join(self.path, '..')]) + svn_diff_output = subprocess.check_output(["svn", "diff", os.path.normpath(os.path.join(self.cwd, '..'))]) if svn_diff_output != '': print svn_diff_output print >>sys.stderr, "ERROR: Package has uncommitted changes!" @@ -1273,8 +1273,8 @@ def cmd_clean_spec_multi(args): changes = {} - # Convert -devel requires into pkgconfig requires - if options.pkgconfig: + # Convert perl- and -devel buildrequires into perl() and pkgconfig() requires + if options.convert_br: br = s.buildrequires no_alt = set() no_change = {} @@ -1550,10 +1550,10 @@ def main(): subparser.add_argument("-f", "--force", action="store_true") subparser.add_argument("-a", "--all", action="store_true", dest="all", help="checkout all Downstream packages") - subparser.add_argument("--pkgconfig", action="store_true", dest="pkgconfig", - help="convert -devel buildrequirements to pkgconfig if possible") + subparser.add_argument("--convert", action="store_true", dest="convert_br", + help="convert -buildrequirements to perl/pkgconfig if possible") subparser.set_defaults( - func=cmd_clean_spec, doit=False, pkgconfig=False, all=False, force=False + func=cmd_clean_spec, doit=False, convert_br=False, all=False, force=False ) subparser = subparsers.add_parser('check-version', help='check if spec version and downstream version match') -- cgit v1.2.1