424 |
def cmd_package_new_version(options, parser): |
def cmd_package_new_version(options, parser): |
425 |
package = options.package |
package = options.package |
426 |
|
|
427 |
cwd = os.path.join(os.path.expanduser(PKGROOT), package) |
root = os.path.expanduser(PKGROOT) |
428 |
|
cwd = os.path.join(root, package) |
429 |
|
|
430 |
subprocess.call(['mgarepo', 'co', package], cwd=cwd) |
try: |
431 |
|
subprocess.check_call(['mgarepo', 'co', package], cwd=root) |
432 |
|
except subprocess.CalledProcessError: |
433 |
|
sys.exit(1) |
434 |
s = SpecFile(os.path.join(cwd, "SPECS", "%s.spec" % package)) |
s = SpecFile(os.path.join(cwd, "SPECS", "%s.spec" % package)) |
435 |
print "%s => %s" % (s.version, options.version) |
print "%s => %s" % (s.version, options.version) |
436 |
if not s.update(options.version): |
if not s.update(options.version): |