aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBogdano Arendartchuk <bogdano@mandriva.org>2008-06-24 00:32:50 +0000
committerBogdano Arendartchuk <bogdano@mandriva.org>2008-06-24 00:32:50 +0000
commitc37942a223826ec7ca08184adeda2c861c0ad7c9 (patch)
treed74fc984c13075f8b0b1b0348ea2313e633d927a
parent18847945d23b9b8acdb14eb27ac2de865c7dac34 (diff)
downloadmgarepo-topic/upload-tarball.tar
mgarepo-topic/upload-tarball.tar.gz
mgarepo-topic/upload-tarball.tar.bz2
mgarepo-topic/upload-tarball.tar.xz
mgarepo-topic/upload-tarball.zip
Renamed the "sources" file to "binrepo.lst"topic/upload-tarball
-rw-r--r--RepSys/binrepo.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/RepSys/binrepo.py b/RepSys/binrepo.py
index 12e394a..ba5e4bb 100644
--- a/RepSys/binrepo.py
+++ b/RepSys/binrepo.py
@@ -18,6 +18,7 @@ from cStringIO import StringIO
DEFAULT_TARBALLS_REPO = "/tarballs"
BINLIST_PENDING = "repsys-upload"
BINLIST_DELETE = "repsys-delete"
+BINREPO_LIST = "binrepo.lst"
class ChecksumError(Error):
pass
@@ -91,6 +92,9 @@ def copy(sources, dest, sourcehost=None, desthost=None, makedirs=False,
raise Error, "can't overwrite directory: %s" % e
execcmd("cp %s %s %s" % (opts, source, dpath))
+def binlist_file():
+ return config.get("binrepo", "binaries-file", BINREPO_LIST)
+
def svn_basedir(target):
svn = SVN()
info = svn.info2(target)
@@ -172,7 +176,7 @@ def parse_sources(path, force=False):
if not os.path.exists(path) and not force:
return {}
basedir = os.path.dirname(path)
- spath = os.path.join(basedir, "sources")
+ spath = os.path.join(basedir, binlist_file())
f = open(spath)
entries = parse_sources_stream(f)
f.close()
@@ -188,11 +192,10 @@ def dump_sources(path, entries):
def sources_path(path):
# returns the 'sources' file path for a give file path or directory
- sname = config.get("binrepo", "sources-file", "sources")
sdir = path
if not os.path.isdir(path):
sdir = os.path.dirname(path)
- spath = os.path.join(sdir, "sources")
+ spath = os.path.join(sdir, binlist_file())
return spath
def get_chksum(path):
@@ -358,8 +361,7 @@ def markrelease(srcurl, desturl, version, release, revision):
spath = source[source.find(":")+1:]
tpath = target[target.find(":")+1:]
tmproot = target_root[target_root.find(":")+1:]
- sname = config.get("binrepo", "sources-file", "sources")
- sourcesurl = os.path.join(srcurl, sname)
+ sourcesurl = os.path.join(srcurl, binlist_file())
try:
stream = StringIO(svn.cat(sourcesurl, rev=revision))
except Error: