[yum-cvs] yum-utils yum-util-cli-template, NONE, 1.1 Makefile, 1.12, 1.13 yum-utils.spec, 1.40, 1.41
Seth Vidal
skvidal at linux.duke.edu
Tue May 1 16:42:06 UTC 2007
Update of /home/groups/yum/cvs/yum-utils
In directory login1.linux.duke.edu:/tmp/cvs-serv21910
Modified Files:
Makefile yum-utils.spec
Added Files:
yum-util-cli-template
Log Message:
- finish added debuginfo-install to makefile
- add yum-util-cli-template to repo and add it to %doc in spec file
- this is a template for folks to easily add more cli-based yum-utils
--- NEW FILE yum-util-cli-template ---
#!/usr/bin/python
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Copyright 2007 Seth Vidal
import sys
sys.path.insert(0,'/usr/share/yum-cli/')
import yum
import yum.Errors
from cli import *
from utils import YumUtilBase
class MyYumUtil(YumUtilBase):
NAME = 'myyumutil'
VERSION = '1.0'
USAGE = '"usage: myyumutil [options] package1 [package2] [package..]'
def __init__(self):
YumUtilBase.__init__(self,
MyYumUtil.NAME,
MyYumUtil.VERSION,
MyYumUtil.USAGE)
self.logger = logging.getLogger("yum.verbose.cli.myyumutil")
self.main()
def main(self):
# Add util commandline options to the yum-cli ones
parser = self.getOptionParser()
# Parse the commandline option and setup the basics.
opts = self.doUtilConfigSetup()
# Check if there is anything to do.
if len(self.cmds) < 1:
parser.print_help()
sys.exit(0)
# at this point you have the entire YumBaseCli object as 'self'
# you can do whatever you want
# if you want to make sure to build and run a transaction based on
# what you added to the tsInfo then do:
#self.buildTransaction()
#self.doTransaction()
if __name__ == '__main__':
util = MyYumUtil()
Index: Makefile
===================================================================
RCS file: /home/groups/yum/cvs/yum-utils/Makefile,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Makefile 13 Mar 2007 11:53:03 -0000 1.12
+++ Makefile 1 May 2007 16:42:04 -0000 1.13
@@ -1,6 +1,6 @@
SUBDIRS = docs
PKGNAME = yum-utils
-UTILS = package-cleanup repoclosure repomanage repoquery repo-graph repo-rss yumdownloader yum-builddep repotrack reposync
+UTILS = package-cleanup debuginfo-install repoclosure repomanage repoquery repo-graph repo-rss yumdownloader yum-builddep repotrack reposync
VERSION=$(shell awk '/Version:/ { print $$2 }' ${PKGNAME}.spec)
RELEASE=$(shell awk '/Release:/ { print $$2 }' ${PKGNAME}.spec)
WEBHOST = login.dulug.duke.edu
Index: yum-utils.spec
===================================================================
RCS file: /home/groups/yum/cvs/yum-utils/yum-utils.spec,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- yum-utils.spec 1 May 2007 16:35:27 -0000 1.40
+++ yum-utils.spec 1 May 2007 16:42:04 -0000 1.41
@@ -195,7 +195,7 @@
%files
%defattr(-, root, root)
-%doc README
+%doc README yum-util-cli-template
%doc COPYING
%doc plugins/README
%{_bindir}/debuginfo-install
More information about the Yum-cvs-commits
mailing list