[yum-commits] 3 commits - docs/yum-versionlock.1 plugins/aliases plugins/local
James Antill
james at osuosl.org
Mon Dec 28 19:29:56 UTC 2009
docs/yum-versionlock.1 | 21 +++++++++++++--------
plugins/aliases/aliases.py | 2 +-
plugins/local/local.py | 20 ++++++++++++++++++--
3 files changed, 32 insertions(+), 11 deletions(-)
New commits:
commit a0cc0ae65f9a9698550b5df98b8cdd6a3286651c
Author: Gerhardus Geldenhuis <gerhardus.geldenhuis at gmail.com>
Date: Mon Dec 28 14:29:24 2009 -0500
made the page more apropos friendly
changed synopsis to specify usage
diff --git a/docs/yum-versionlock.1 b/docs/yum-versionlock.1
index c7bb818..f8d215b 100644
--- a/docs/yum-versionlock.1
+++ b/docs/yum-versionlock.1
@@ -1,19 +1,17 @@
.\" PROCESS THIS FILE WITH
.\" groff -man -Tascii yum-versionlock.1
.\"
-.TH YUM-VERSIONLOCK 1 "27 JULY 2008" "" "User Manuals"
+.TH YUM-VERSIONLOCK 1 "28 DECEMBER 2009" "" "User Manuals"
.SH NAME
-.B yum-versionlock
+yum-versionlock - Version lock rpm packages
.SH SYNOPSIS
-The
.B yum-versionlock
-package
+[ package-name [ package-name]] ...
.SH DESCRIPTION
.BR yum-versionlock(1)
is a Yum plugin that takes a set of name/versions for packages and excludes all
other versions of those packages (including optionally following obsoletes).
-This allows you to protect packages from being updated by newer versions,
-for example.
+This allows you to protect packages from being updated by newer versions.
.SH FILES
.I /etc/yum/pluginconf.d/versionlock.conf
.RS
@@ -24,7 +22,11 @@ for more information.
.I /etc/yum/pluginconf.d/versionlock.list
.RS
The default place to put package version lock information (one package and
-version per. line).
+version per. line). The file takes entries in the following format
+.BR EPOCH:NAME-VERSION-RELEASE.ARCH
+See
+.BR rpm(8)
+for more information on custom query formats. If the package does not have an EPOCH the number will default to 0.
.RE
.SH BUGS
If you happen to run across a bug, you can report it via yum-devel at lists.baseurl.org filed in bugzilla.
@@ -34,9 +36,12 @@ yum-versionlock is available via:
# yum install yum-versionlock
.fi
.SH AUTHORS
-.RS
Panu Matilainen <pmatilai at laiskiainen.org>
.br
James Antill <james at and.org>
+.br
+Documetation modified by:
+.br
+Gerhardus Geldenhuis <gerhardus.geldenhuis at gmail.com>
.SH "SEE ALSO"
.BR yum(1)
commit ea2c0e0c5b9807d03ecade6d4d8f8d756150d055
Author: James Antill <james at and.org>
Date: Sat Dec 26 16:13:32 2009 -0500
Allow people to ove rpms into and out of the local dir. manually
diff --git a/plugins/local/local.py b/plugins/local/local.py
index cda1ee5..eaa6fb3 100644
--- a/plugins/local/local.py
+++ b/plugins/local/local.py
@@ -35,12 +35,22 @@ plugin_type = (TYPE_CORE,)
def_local_repo_dir = '/var/lib/yum/plugins/local'
+def prereposetup_hook(conduit):
+ global local_repo_dir
+ local_repo_dir = conduit.confString('main', 'repodir',
+ default=def_local_repo_dir)
+ try:
+ d_mtime = os.stat(local_repo_dir).st_mtime
+ r_mtime = os.stat("%s/repodata/repomd.xml" % local_repo_dir).st_mtime
+ if d_mtime > r_mtime:
+ _rebuild(conduit)
+ except:
+ pass
+
def postdownload_hook(conduit):
if conduit.getErrors() or os.geteuid():
return
- local_repo_dir = conduit.confString('main', 'repodir',
- default=def_local_repo_dir)
reg = False
done = 0
@@ -65,7 +75,10 @@ def postdownload_hook(conduit):
if not done:
return
+ _rebuild(conduit)
+ _reposetup(conduit)
+def _rebuild(conduit):
cache_dir = conduit.confString('createrepo', 'cachedir', default=None)
checksum = conduit.confString('createrepo', 'checksum', default=None)
@@ -104,9 +117,12 @@ def postdownload_hook(conduit):
conduit.info(2, "== Rebuilding _local repo. with %u new packages ==" %
done)
os.spawnvp(os.P_WAIT, "createrepo", args)
+ # For the prerepo. check
+ os.utime("%s/repodata/repomd.xml" % local_repo_dir, None)
if not quiet:
conduit.info(2, "== Done rebuild of _local repo. ==")
+def _reposetup(conduit):
lrepo = [repo for repo in conduit._base.repos.listEnabled()
if repo.id == "_local"]
if lrepo:
commit ef0b886bf6eafe0520e67e7062824a89ff73b973
Author: James Antill <james at and.org>
Date: Sat Dec 26 16:12:14 2009 -0500
Fix yum "" edge case in aliases, BZ 550647
diff --git a/plugins/aliases/aliases.py b/plugins/aliases/aliases.py
index 908b212..71db86c 100644
--- a/plugins/aliases/aliases.py
+++ b/plugins/aliases/aliases.py
@@ -74,7 +74,7 @@ def resolve_aliases(args, log, skip=0):
need_rep = False
num = skip
for arg in args[skip:]:
- if arg[0] != '-':
+ if arg and arg[0] != '-':
break
num += 1
More information about the Yum-commits
mailing list