aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/rpmutil.py
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-01-13 00:43:54 +0000
committerNicolas Vigier <boklm@mageia.org>2011-01-13 00:43:54 +0000
commit72ccffd028d506edf9d9b9f88711a05e10e8dc11 (patch)
treeb2362bbcf3cf2f8fc21fe22f693625df7d1aa4d6 /MgaRepo/rpmutil.py
parent7ae1a3b117c439210bd02fd7daaaa000d1cc754a (diff)
downloadmgarepo-72ccffd028d506edf9d9b9f88711a05e10e8dc11.tar
mgarepo-72ccffd028d506edf9d9b9f88711a05e10e8dc11.tar.gz
mgarepo-72ccffd028d506edf9d9b9f88711a05e10e8dc11.tar.bz2
mgarepo-72ccffd028d506edf9d9b9f88711a05e10e8dc11.tar.xz
mgarepo-72ccffd028d506edf9d9b9f88711a05e10e8dc11.zip
don't allow importing package already on svn
Diffstat (limited to 'MgaRepo/rpmutil.py')
-rw-r--r--MgaRepo/rpmutil.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py
index 2bf3ef4..80a14a0 100644
--- a/MgaRepo/rpmutil.py
+++ b/MgaRepo/rpmutil.py
@@ -205,8 +205,6 @@ def put_srpm(srpmfile, markrelease=False, striplog=True, branch=None,
releaseurl = "/".join([versionurl, srpm.release])
currenturl = "/".join([pkgurl, "current"])
currentdir = os.path.join(tmpdir, "current")
- #FIXME when pre-commit hook fails, there's no clear way to know
- # what happened
ret = svn.mkdir(pkgurl, noerror=1, log="Created package directory")
if ret or not svn.ls(currenturl, noerror=1):
svn.checkout(pkgurl, tmpdir)
@@ -217,12 +215,7 @@ def put_srpm(srpmfile, markrelease=False, striplog=True, branch=None,
#svn.commit(tmpdir,log="Created package structure.")
version_exists = 1
else:
- if svn.ls(releaseurl, noerror=1):
- raise Error, "release already exists"
- svn.checkout("/".join([pkgurl, "current"]), tmpdir)
- svn.mkdir(versionurl, noerror=1,
- log="Created directory for version %s." % version)
- currentdir = tmpdir
+ raise Error, "package already exists or error creating package directory"
specsdir = os.path.join(currentdir, "SPECS")
sourcesdir = os.path.join(currentdir, "SOURCES")