[Yum] [PATCH 1/3] enable delta rpms in the local repository

atodorov at otb.bg atodorov at otb.bg
Sat Feb 26 20:02:43 UTC 2011


From: Alexander Todorov <atodorov at otb.bg>

---
 plugins/local/local.py |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/plugins/local/local.py b/plugins/local/local.py
index 70118c9..0d01e66 100644
--- a/plugins/local/local.py
+++ b/plugins/local/local.py
@@ -91,6 +91,10 @@ def _rebuild(conduit, done=None):
     update = conduit.confBool('createrepo', 'update', default=True)
     databases = conduit.confBool('createrepo', 'databases', default=True)
 
+    deltas = conduit.confBool('createrepo', 'deltas', default=False)
+    num_deltas = conduit.confInt('createrepo', 'num-deltas', default=None)
+    old_package_dirs = conduit.confString('createrepo', 'oldpackagedirs', default=local_repo_dir)
+
     if conduit._base.verbose_logger.isEnabledFor(yum.logginglevels.DEBUG_3):
         quiet = False
 
@@ -113,6 +117,13 @@ def _rebuild(conduit, done=None):
     if cache_dir is not None:
         args.append("--cachedir")
         args.append(cache_dir)
+    if deltas:
+        args.append('--deltas')
+        args.append('--oldpackagedirs')
+        args.append(old_package_dirs)
+    if num_deltas is not None:
+        args.append('--num-deltas')
+        args.append(num_deltas)
     args.append(local_repo_dir)
     if not quiet:
         if done is None:
-- 
1.7.1



More information about the Yum mailing list