aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageialinux-online.org>2016-02-16 22:12:28 +0100
committerPapoteur <papoteur@mageialinux-online.org>2016-02-16 22:12:28 +0100
commit14c5291c6b6b5afb4db67efa6ead28c195e2151f (patch)
treeba5c5fef4894e6982bbadc18be8d419d87391d65
parentabfafd0f7843c188583e5c607168320ba2cfbc8b (diff)
downloadmgarepo-14c5291c6b6b5afb4db67efa6ead28c195e2151f.tar
mgarepo-14c5291c6b6b5afb4db67efa6ead28c195e2151f.tar.gz
mgarepo-14c5291c6b6b5afb4db67efa6ead28c195e2151f.tar.bz2
mgarepo-14c5291c6b6b5afb4db67efa6ead28c195e2151f.tar.xz
mgarepo-14c5291c6b6b5afb4db67efa6ead28c195e2151f.zip
add function obsolete in rpmutil.py
-rw-r--r--MgaRepo/rpmutil.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py
index 0b127d8..8c00da9 100644
--- a/MgaRepo/rpmutil.py
+++ b/MgaRepo/rpmutil.py
@@ -674,6 +674,15 @@ def delete(paths, commit=False):
if commit:
svn.commit(path, log=message)
+def obsolete(pkgdirurl, branch=None, distro=None, backports=None, commit=False, log=None):
+ o_pkgdirurl = pkgdirurl
+ pkgdirurl = layout.package_url(o_pkgdirurl, distro=distro, backports=backports)
+ pkgdest = layout.package_url(o_pkgdirurl, obsolete=True, backports=backports)
+ svn = SVN()
+ svn.mv(pkgdirurl, pkgdest, message=log)
+ if commit:
+ svn.commit(path, log=log)
+
def switch(mirrorurl=None):
svn = SVN()
topdir = getpkgtopdir()