diff options
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | MgaRepo/log.py | 7 | ||||
-rw-r--r-- | MgaRepo/rpmutil.py | 5 |
3 files changed, 11 insertions, 3 deletions
@@ -1,4 +1,6 @@ +- allow keeping the old rpm log in the package directory if the oldurl + config value is set to '.' or starts with './' - add putsrpm command in man page (#4055) - fix putsrpm --help message (#4053) - update URLs for new wiki diff --git a/MgaRepo/log.py b/MgaRepo/log.py index 643f397..a1ea0bf 100644 --- a/MgaRepo/log.py +++ b/MgaRepo/log.py @@ -545,8 +545,11 @@ def get_old_log(pkgdirurl): svn = SVN() tmpdir = tempfile.mktemp() try: - pkgname = layout.package_name(pkgdirurl) - pkgoldurl = os.path.join(oldurl, pkgname) + if oldurl == '.' or oldurl.startswith('./'): + pkgoldurl = os.path.join(pkgdirurl, oldurl) + else: + pkgname = layout.package_name(pkgdirurl) + pkgoldurl = os.path.join(oldurl, pkgname) try: # we're using HEAD here because fixes in misc/ (oldurl) may # be newer than packages' last changed revision. 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() |