aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/rpmutil.py
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2012-12-04 13:18:55 +0000
committerNicolas Vigier <boklm@mageia.org>2012-12-04 13:18:55 +0000
commitfa6e28fa34acb6167d5a70c138c5041d1b19d03d (patch)
tree4e8227c9e722d7f74e2b88c0cdc4a6012bf8f216 /MgaRepo/rpmutil.py
parentad16dbd1dafba41e04a00428dc6ad83ee1651e73 (diff)
downloadmgarepo-fa6e28fa34acb6167d5a70c138c5041d1b19d03d.tar
mgarepo-fa6e28fa34acb6167d5a70c138c5041d1b19d03d.tar.gz
mgarepo-fa6e28fa34acb6167d5a70c138c5041d1b19d03d.tar.bz2
mgarepo-fa6e28fa34acb6167d5a70c138c5041d1b19d03d.tar.xz
mgarepo-fa6e28fa34acb6167d5a70c138c5041d1b19d03d.zip
Allow keeping old rpm log in package directory
With this change, it is now possible to store the old rpm log inside the package directory instead of using a separate directory (usually /misc/ directory). This can be done by changing the oldurl setting in mgarepo.conf to '.' or anything starting with './'. It becomes possible to have different import logs if using different packages in different versions of the distribution instead of one log file shared for all versions of the distribution.
Diffstat (limited to 'MgaRepo/rpmutil.py')
-rw-r--r--MgaRepo/rpmutil.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py
index 3a9ee83..f0d413b 100644
--- a/MgaRepo/rpmutil.py
+++ b/MgaRepo/rpmutil.py
@@ -298,7 +298,10 @@ def put_srpm(srpmfile, markrelease=False, striplog=True, branch=None,
chlog.seek(0)
#FIXME move it to layout.py
oldurl = baseold or config.get("log", "oldurl")
- pkgoldurl = mirror._joinurl(oldurl, srpm.name)
+ if oldurl == '.' or oldurl.startswith('./'):
+ pkgoldurl = os.path.join(pkgurl, oldurl)
+ else:
+ pkgoldurl = mirror._joinurl(oldurl, srpm.name)
svn.mkdir(pkgoldurl, noerror=1,
log="created old log directory for %s" % srpm.name)
logtmp = tempfile.mktemp()