summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlav Vitters <olav@vitters.nl>2014-07-08 01:12:51 +0200
committerOlav Vitters <olav@vitters.nl>2014-07-08 01:12:51 +0200
commit16d9ff072a55820cc45640f9ee9699bd6be6fca5 (patch)
tree0a936bce7860272983fe1d67d13dc9f5eb963f90
parent11605ce5f6661303b09aa9cad8bba7a4eda89f8f (diff)
downloadmgagnome-16d9ff072a55820cc45640f9ee9699bd6be6fca5.tar
mgagnome-16d9ff072a55820cc45640f9ee9699bd6be6fca5.tar.gz
mgagnome-16d9ff072a55820cc45640f9ee9699bd6be6fca5.tar.bz2
mgagnome-16d9ff072a55820cc45640f9ee9699bd6be6fca5.tar.xz
mgagnome-16d9ff072a55820cc45640f9ee9699bd6be6fca5.zip
change --pkgconfig option to --convert, improve svn diff output
-rwxr-xr-xmgagnome14
1 files 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')