Skip to content

Instantly share code, notes, and snippets.

@taaem
Last active September 22, 2016 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taaem/c80d094d31545f10f6d58f2ba4dcb675 to your computer and use it in GitHub Desktop.
Save taaem/c80d094d31545f10f6d58f2ba4dcb675 to your computer and use it in GitHub Desktop.
Promote all packages from devel: to testing:, pipe this into sh
import subprocess
import os
trepo = "nemo:testing:hw:{0}:{1}".format(os.environ["VENDOR"],os.environ["DEVICE"])
drepo = "nemo:devel:hw:{0}:{1}".format(os.environ["VENDOR"],os.environ["DEVICE"])
cmd = "osc ls {0}".format(drepo)
process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE)
packages = process.communicate()[0]
for p in packages.split('\n'):
p = p.strip()
if p == '' or p[0] == '#' or p == "_pattern":
continue
print "osc -A https://api.merproject.org copypac {0} {1} {2}".format(drepo,p,trepo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment