aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/rpmutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'MgaRepo/rpmutil.py')
-rw-r--r--MgaRepo/rpmutil.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py
index 66343b5..b71afb0 100644
--- a/MgaRepo/rpmutil.py
+++ b/MgaRepo/rpmutil.py
@@ -514,7 +514,7 @@ def ispkgtopdir(path=None):
names = os.listdir(path)
return (".svn" in names and "SPECS" in names and "SOURCES" in names)
-def sync(dryrun=False, commit=False, download=False):
+def sync(dryrun=False, commit=False, download=False, up=False):
svn = SVN()
topdir = getpkgtopdir()
spath = binrepo.sources_path(topdir)
@@ -596,6 +596,18 @@ def sync(dryrun=False, commit=False, download=False):
print("A\t%s" % path)
if not dryrun:
upload([path], commit=commit)
+ # check binrepo files
+ changed = binrepo.check_sources(topdir)
+ if changed:
+ changed_paths = []
+ for filename in changed:
+ filepath = os.path.join(topdir, 'SOURCES', filename)
+ changed_paths.append(filepath)
+ print('M\t%s' % filepath)
+ if not dryrun and up:
+ binrepo.upload_binary(topdir, filename)
+ if not dryrun and up:
+ binrepo.update_sources(topdir, added=changed_paths)
def commit(target=".", message=None, logfile=None):
svn = SVN()