From fa6e28fa34acb6167d5a70c138c5041d1b19d03d Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Tue, 4 Dec 2012 13:18:55 +0000 Subject: 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. --- MgaRepo/rpmutil.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'MgaRepo/rpmutil.py') 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() -- cgit v1.2.1