[yum-cvs] Makefile plugins/priorities

Tim Lauridsen timlau at linux.duke.edu
Mon Nov 12 14:53:15 UTC 2007


 Makefile                         |    4 ++--
 plugins/priorities/ChangeLog     |    3 +++
 plugins/priorities/priorities.py |    9 +++++----
 3 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 8026541ebad030a90d93eb9bb39f62c3f5297d57
Author: Tim Lauridsen <tim at localhost.localdomain>
Date:   Mon Nov 12 15:50:36 2007 +0100

    Added optparser check in priorities plugin (bz #847)

diff --git a/Makefile b/Makefile
index 212efbe..fc0c7d9 100644
--- a/Makefile
+++ b/Makefile
@@ -34,8 +34,8 @@ release:
 	@$(MAKE) ChangeLog
 	@git commit -a -m "updated ChangeLog"
 	@git push
-	@git tag -a ${PKGNAME}-$(VERSION) -m "Tagged ${PKGNAME}-$(VERSION)"
-	@git push --tags
+	@git tag -a -m "Tagged ${PKGNAME}-$(VERSION)" ${PKGNAME}-$(VERSION)
+	@git push --tags origin
 	@$(MAKE) upload
 	
 upload: archive srpm
diff --git a/plugins/priorities/ChangeLog b/plugins/priorities/ChangeLog
index 72342e6..f2d7d8e 100644
--- a/plugins/priorities/ChangeLog
+++ b/plugins/priorities/ChangeLog
@@ -1,3 +1,6 @@
+* Thu Nov 8 Daniel de Kok <daniel at centos.org> - 0.0.7
+- Only add an option if an option parser is returned.
+
 * Mon Nov 5 Daniel de Kok <daniel at centos.org> - 0.0.6
 - Make excluding based on package name + arch optional. Default to
   exclusion by name.
diff --git a/plugins/priorities/priorities.py b/plugins/priorities/priorities.py
index 7365915..fd33591 100644
--- a/plugins/priorities/priorities.py
+++ b/plugins/priorities/priorities.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# yum-plugin-priorities 0.0.6
+# yum-plugin-priorities 0.0.7
 #
 # Copyright (c) 2006-2007 Daniel de Kok
 #
@@ -75,9 +75,10 @@ def config_hook(conduit):
 
     # Command-line options.
     parser = conduit.getOptParser()
-    parser.add_option('', '--samearch-priorities', dest='samearch',
-        action='store_true', default = False,
-        help="Priority-exclude packages based on name + arch")
+    if parser:
+        parser.add_option('', '--samearch-priorities', dest='samearch',
+            action='store_true', default = False,
+            help="Priority-exclude packages based on name + arch")
 
 def exclude_hook(conduit):
     global only_samearch



More information about the Yum-cvs-commits mailing list