[yum-commits] 4 commits - plugins/local

James Antill james at osuosl.org
Mon Feb 28 14:41:11 UTC 2011


 plugins/local/local.conf |   18 ++++++++++++++++++
 plugins/local/local.py   |   15 +++++++++++++++
 2 files changed, 33 insertions(+)

New commits:
commit 04074d44ee0da57ecb77a56b325fe5452fe93926
Author: James Antill <james at and.org>
Date:   Mon Feb 28 09:37:21 2011 -0500

    Change deltas to enable_deltas and num-deltas to deltas.

diff --git a/plugins/local/local.conf b/plugins/local/local.conf
index dea0f21..1f5e70d 100644
--- a/plugins/local/local.conf
+++ b/plugins/local/local.conf
@@ -24,10 +24,10 @@ update = true
 databases = true
 
 # createrepo deltarpm support - set to true to enable.
-# deltas = false
+# enable_deltas = false
 
 # How many delta packages to build?
-# num-deltas = 1
+# deltas = 1
 
 # Where to look for old packages? By default this is repodir. You can
 # also specify a different directory which holds older packages.
diff --git a/plugins/local/local.py b/plugins/local/local.py
index 81ae2d7..c45a1ce 100644
--- a/plugins/local/local.py
+++ b/plugins/local/local.py
@@ -95,8 +95,8 @@ 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)
+    deltas = conduit.confBool('createrepo', 'enable_deltas', default=False)
+    num_deltas = conduit.confInt('createrepo', 'deltas', default=None)
     old_package_dirs = conduit.confString('createrepo', 'oldpackagedirs', default=local_repo_dir)
 
     if conduit._base.verbose_logger.isEnabledFor(yum.logginglevels.DEBUG_3):
commit 6e573696fbcb852f04972104ac65206a34ca6328
Author: Alexander Todorov <atodorov at otb.bg>
Date:   Sat Feb 26 22:02:45 2011 +0200

    document newly added config options and the repodir option

diff --git a/plugins/local/local.conf b/plugins/local/local.conf
index a91f7d5..dea0f21 100644
--- a/plugins/local/local.conf
+++ b/plugins/local/local.conf
@@ -1,8 +1,16 @@
 [main]
 enabled=1
+# Path to the local repository.
+# repodir = /var/lib/yum/plugins/local
 
 # Createreop options. See man createrepo
 [createrepo]
+# This option lets you disable createrepo command. This could be useful
+# for large repositories where metadata is priodically generated by cron
+# for example. This also has the side effect of only copying the packages
+# to the local repo directory. 
+# enabled = true
+
 # If you want to speedup createrepo with the --cachedir option. Eg.
 # cachedir = /tmp/createrepo-local-plugin-cachedir
 # If you need to override the checksum with the --checksum option. Eg.
@@ -14,3 +22,13 @@ skip_stat = false
 unique_md_filenames = true
 update = true
 databases = true
+
+# createrepo deltarpm support - set to true to enable.
+# deltas = false
+
+# How many delta packages to build?
+# num-deltas = 1
+
+# Where to look for old packages? By default this is repodir. You can
+# also specify a different directory which holds older packages.
+# oldpackagedirs = /var/lib/yum/plugins/local
commit abd67c1e6b37464eac6a153200999fb873bf85f0
Author: Alexander Todorov <atodorov at otb.bg>
Date:   Sat Feb 26 22:02:44 2011 +0200

    add option to enable/disable createrepo if desired

diff --git a/plugins/local/local.py b/plugins/local/local.py
index 0d01e66..81ae2d7 100644
--- a/plugins/local/local.py
+++ b/plugins/local/local.py
@@ -80,6 +80,10 @@ def postdownload_hook(conduit):
     _reposetup(conduit)
 
 def _rebuild(conduit, done=None):
+    enabled = conduit.confBool('createrepo', 'enabled', default=True)
+    if not enabled:
+        return
+
     cache_dir = conduit.confString('createrepo', 'cachedir', default=None)
     checksum  = conduit.confString('createrepo', 'checksum', default=None)
 
commit d29363578f5d792341451cbcdd7f0e03f91f58c5
Author: Alexander Todorov <atodorov at otb.bg>
Date:   Sat Feb 26 22:02:43 2011 +0200

    enable delta rpms in the local repository

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:


More information about the Yum-commits mailing list