diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-08-17 17:19:49 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-08-17 17:19:49 +0000 |
commit | ad70c046665406f534d25dc823e9a372fdf55e3c (patch) | |
tree | c7d209ce6d9df9e89d7696d3a83b69c603dc420d /MgaRepo/rpmutil.py | |
parent | 4fbf2c39292b718d950a9b6b8f3b243104b4c84a (diff) | |
download | mgarepo-ad70c046665406f534d25dc823e9a372fdf55e3c.tar mgarepo-ad70c046665406f534d25dc823e9a372fdf55e3c.tar.gz mgarepo-ad70c046665406f534d25dc823e9a372fdf55e3c.tar.bz2 mgarepo-ad70c046665406f534d25dc823e9a372fdf55e3c.tar.xz mgarepo-ad70c046665406f534d25dc823e9a372fdf55e3c.zip |
delete function removes files from sha1.lst
Diffstat (limited to 'MgaRepo/rpmutil.py')
-rw-r--r-- | MgaRepo/rpmutil.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py index caaba3b..33ee563 100644 --- a/MgaRepo/rpmutil.py +++ b/MgaRepo/rpmutil.py @@ -651,18 +651,19 @@ def upload(paths, commit=False): svn.commit(path, log=message) def delete(paths, commit=True): - refurl = binrepo.svn_root(paths[0]) - if not binrepo.enabled(refurl): - raise Error, "binary repository is not enabled for %s" % refurl + silent = config.get("log", "ignore-string", "SILENT") for path in paths: + message = "%s: delete file %s" % (silent, path) if binrepo.is_binary(path): - binrepo.remove(path, commit=commit) + topdir = getpkgtopdir() + binrepo.update_sources(topdir, removed=[path]) + if commit: + svn = SVN() + svn.commit(binrepo.sources_path(topdir), log=message) else: svn = SVN() svn.remove(path, local=True) if commit: - silent = config.get("log", "ignore-string", "SILENT") - message = "%s: delete file %s" % (silent, path) svn.commit(path, log=message) def switch(mirrorurl=None): |