diff options
Diffstat (limited to 'src/pyfedpkg/__init__.py')
-rw-r--r-- | src/pyfedpkg/__init__.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index 474053c..cfd9f3b 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -696,6 +696,28 @@ def push(path=None): _run_command(cmd, cwd=path) return +def retire(path, message=None): + """Retire a Fedora package""" + + cmd = ['git', 'rm', '-rf', path] + _run_command(cmd, cwd=path) + + if message: + msg = message + else: + msg = 'Package is retired' + + fd = open(os.path.join(path, 'dead.package'), 'w') + fd.write(msg) + fd.close() + + cmd = ['git', 'add', os.path.join(path, 'dead.package')] + _run_command(cmd, cwd=path) + + commit (path, msg) + + return + def sources(path, outdir=None): """Download source files""" |