aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--MgaRepo/log.py7
-rw-r--r--MgaRepo/rpmutil.py5
3 files changed, 11 insertions, 3 deletions
diff --git a/CHANGES b/CHANGES
index b5450a6..7a7ffea 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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()