aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-08-17 16:59:03 +0000
committerNicolas Vigier <boklm@mageia.org>2011-08-17 16:59:03 +0000
commit019c4d5a7fdf3813eb06740598cd8a378f2d1f57 (patch)
tree96c7e42f3ae23011edd3378057acaa55e95b72cd
parent2cb31864649e52823e9f0481eee3dda01cf61535 (diff)
downloadmgarepo-019c4d5a7fdf3813eb06740598cd8a378f2d1f57.tar
mgarepo-019c4d5a7fdf3813eb06740598cd8a378f2d1f57.tar.gz
mgarepo-019c4d5a7fdf3813eb06740598cd8a378f2d1f57.tar.bz2
mgarepo-019c4d5a7fdf3813eb06740598cd8a378f2d1f57.tar.xz
mgarepo-019c4d5a7fdf3813eb06740598cd8a378f2d1f57.zip
upload on new binrepo
-rw-r--r--MgaRepo/rpmutil.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py
index 5f3c196..7874c29 100644
--- a/MgaRepo/rpmutil.py
+++ b/MgaRepo/rpmutil.py
@@ -634,7 +634,14 @@ def update(target=None):
def upload(paths, commit=True):
for path in paths:
if os.path.isdir(path) or binrepo.is_binary(path):
- binrepo.upload(path, commit=commit)
+ topdir = getpkgtopdir()
+ binrepo.upload_binary(topdir, os.path.basename(path))
+ binrepo.update_sources(topdir, added=[path])
+ if commit:
+ svn = SVN()
+ silent = config.get("log", "ignore-string", "SILENT")
+ message = "%s: new file %s" % (silent, path)
+ svn.commit(binrepo.sources_path(topdir), log=message)
else:
svn = SVN()
svn.add(path, local=True)