From f8e6cbaf83949055ef6b49b3478b09b209854835 Mon Sep 17 00:00:00 2001 From: James Antill Date: Mar 25 2014 04:08:13 +0000 Subject: update to latest HEAD - No error for refilter cleanup, rm dirs. and eat all errors. BZ 1062959. - Use get_uuid_obj() instead of get_uuid(), to help out ostree. - Make utils.get_process_info() respect executable names with spaces. - Fix traceback when history files don't exist and user is not root. --- diff --git a/yum-HEAD.patch b/yum-HEAD.patch index 630a105..c3fd65a 100644 --- a/yum-HEAD.patch +++ b/yum-HEAD.patch @@ -2820,7 +2820,7 @@ index 0000000..7ce1aef + the mailing list, yum@lists.baseurl.org, or consult bugzilla. +.fi diff --git a/docs/yum.8 b/docs/yum.8 -index 1a8202a..6794581 100644 +index 1a8202a..1ab8534 100644 --- a/docs/yum.8 +++ b/docs/yum.8 @@ -25,6 +25,8 @@ gnome\-packagekit application\&. @@ -2963,7 +2963,7 @@ index 1a8202a..6794581 100644 .IP "\fBlist\fP" Is used to list various information about available packages; more complete details are available in the \fIList Options\fP -@@ -191,7 +246,8 @@ the \fIClean Options\fP section below\&. +@@ -191,28 +246,45 @@ the \fIClean Options\fP section below\&. .IP .IP "\fBmakecache\fP" Is used to download and make usable all the metadata for the currently enabled @@ -2972,10 +2972,43 @@ index 1a8202a..6794581 100644 +sure the repos. are current (much like "yum clean expire-cache"). .IP .IP "\fBgroups\fP" - A command, new in 3.4.2, that collects all the subcommands that act on groups together. -@@ -209,10 +265,12 @@ installed. - "\fBgroup list\fP" is used to list the available groups from all \fByum\fP repos. Groups are marked - as "installed" if all mandatory packages are installed, or if a group doesn't +-A command, new in 3.4.2, that collects all the subcommands that act on groups together. ++A command, new in 3.4.2, that collects all the subcommands that act on groups ++together. Note that recent yum using distributions (Fedora-19+, RHEL-7+) have ++configured group_command=objects which changes how group commands act in some ++important ways. + +-"\fBgroup install\fP" is used to install all of the individual packages in a group, of the specified +-types (this works as if you'd taken each of those package names and put them on +-the command line for a "yum install" command). ++"\fBgroup install\fP" is used to install all of the individual packages in a ++group, of the specified types (this works as if you'd taken each of those ++package names and put them on the command line for a "yum install" command). + The group_package_types configuration option specifies which types will + be installed. ++ If you wish to "reinstall" a group so that you get a package that is currently ++blacklisted the easiest way to do that currently is to install the package ++manually and then run "groups mark packages-sync mygroup mypackagename" (or ++use yumdb to set the group_member of the package(s)). + +-"\fBgroup update\fP" is just an alias for groupinstall, which will do the right thing because +-"yum install X" and "yum update X" do the same thing, when X is already +-installed. ++"\fBgroup update\fP" is just an alias for group install, when using ++group_command=compat. This will install packages in the group not already ++installed and upgrade existing packages. With group_command=simple it will just ++upgrade already installed packages. With group_command=objects it will try to ++upgrade the group object, installing any available packages not blacklisted ++(marked '-' in group info) and will upgrade the installed packages. + +-"\fBgroup list\fP" is used to list the available groups from all \fByum\fP repos. Groups are marked +-as "installed" if all mandatory packages are installed, or if a group doesn't ++"\fBgroup list\fP" is used to list the available groups from all \fByum\fP ++repos. When group_command=objects the group is installed if the user ++explicitly installed it (or used the group mark* commands to mark it installed). ++It does not need to have any packages installed. ++When not using group_command=objects groups are shown as "installed" if all ++mandatory packages are installed, or if a group doesn't have any mandatory packages then it is installed if any of the optional or -default package are installed. -The optional "hidden" argument will also list groups marked as not being @@ -2990,7 +3023,7 @@ index 1a8202a..6794581 100644 "\fBgroup remove\fP" is used to remove all of the packages in a group, unlike "groupinstall" this will remove everything regardless of group_package_types. It is worth pointing -@@ -224,23 +282,79 @@ to only remove packages which aren't required by something else. +@@ -224,23 +296,82 @@ to only remove packages which aren't required by something else. "\fBgroup info\fP" is used to give the description and package list of a group (and which type those packages are marked as). Note that you can use the yum-filter-data and @@ -3013,6 +3046,9 @@ index 1a8202a..6794581 100644 +.br +"=" = Package is installed, and was installed via the group. + ++you can move an installed package into an installed group using either ++"group mark package-sync/package-sync-forced" or "yumdb set group_member". ++ +"\fBgroup summary\fP" is used to give a quick summary of how many groups +are installed and available. + @@ -3074,7 +3110,7 @@ index 1a8202a..6794581 100644 reasons only. .IP .IP "\fBlocalupdate\fP" -@@ -248,7 +362,7 @@ Is used to update the system by specifying local rpm files. Only the specified +@@ -248,7 +379,7 @@ Is used to update the system by specifying local rpm files. Only the specified rpm files of which an older version is already installed will be installed, the remaining specified packages will be ignored. If required the enabled repositories will be used to resolve dependencies. Note @@ -3083,7 +3119,7 @@ index 1a8202a..6794581 100644 legacy reasons only. .IP .IP "\fBreinstall\fP" -@@ -260,10 +374,28 @@ on groups, files, provides and filelists just like the "install" command\&. +@@ -260,10 +391,28 @@ on groups, files, provides and filelists just like the "install" command\&. Will try and downgrade a package from the version currently installed to the previously highest version (or the specified version). The depsolver will not necessarily work, but if you specify all the packages it @@ -3113,7 +3149,7 @@ index 1a8202a..6794581 100644 .IP "\fBdeplist\fP" Produces a list of all dependencies and what packages provide those dependencies for the given packages. As of 3.2.30 it now just shows the latest -@@ -273,16 +405,18 @@ changed by using --verbose). +@@ -273,16 +422,18 @@ changed by using --verbose). .IP .IP "\fBrepolist\fP" Produces a list of configured repositories. The default is to list all @@ -3137,7 +3173,7 @@ index 1a8202a..6794581 100644 last column will also display the number of packages in the repo. and (if there are any user specified excludes) the number of packages excluded. -@@ -291,11 +425,66 @@ then yum will ignore any repo errors and output the information it can get +@@ -291,11 +442,66 @@ then yum will ignore any repo errors and output the information it can get (Eg. "yum clean all; yum -C repolist" will output something, although the package counts/etc. will be zeroed out). .IP @@ -3206,7 +3242,7 @@ index 1a8202a..6794581 100644 packages (in sorted order), and the checksum_type/checksum_data entries from the yumdb. Note that this rpmdb version is now also used significantly within yum (esp. in yum history). -@@ -321,26 +510,33 @@ and so takes sub-commands: +@@ -321,26 +527,33 @@ and so takes sub-commands: .IP "\fBhistory\fP" The history command allows the user to view what has happened in past transactions (assuming the history_record config. option is set). You can use @@ -3246,7 +3282,7 @@ index 1a8202a..6794581 100644 A (if it is not still installed), and "rollback 1" will try to remove packages B and C. Note that after a "rollback 1" you will have a fourth transaction, although the ending rpmdb version (see: yum version) should be the same in -@@ -349,13 +545,20 @@ transactions 1 and 4. +@@ -349,13 +562,20 @@ transactions 1 and 4. The addon-info command takes a transaction ID, and the packages-list command takes a package (with wildcards). @@ -3268,7 +3304,7 @@ index 1a8202a..6794581 100644 .I \fB>\fR - The rpmdb was changed, outside yum, after the transaction. .br .I \fB<\fR - The rpmdb was changed, outside yum, before the transaction. -@@ -371,11 +574,193 @@ end of the package column in the packages-list command). +@@ -371,11 +591,193 @@ end of the package column in the packages-list command). .I \fBs\fR - The transaction completed fine, but --skip-broken was enabled and had to skip some packages. .br @@ -3464,7 +3500,7 @@ index 1a8202a..6794581 100644 The info command can also take ranges of transaction ids, of the form start..end, which will then display a merged history as if all the -@@ -401,6 +786,11 @@ Assume yes; assume that the answer to any question which would be asked +@@ -401,6 +803,11 @@ Assume yes; assume that the answer to any question which would be asked is yes\&. .br Configuration Option: \fBassumeyes\fP @@ -3476,7 +3512,7 @@ index 1a8202a..6794581 100644 .IP "\fB\-c, \-\-config=[config file]\fP" Specifies the config file location - can take HTTP and FTP URLs and local file paths\&. -@@ -420,7 +810,7 @@ Sets the error level to [number] Practical range 0 \- 10. 0 means print only cri +@@ -420,7 +827,7 @@ Sets the error level to [number] Practical range 0 \- 10. 0 means print only cri .br Configuration Option: \fBerrorlevel\fP .IP "\fB\-\-rpmverbosity=[name]\fP" @@ -3485,7 +3521,7 @@ index 1a8202a..6794581 100644 options are: 'critical', 'emergency', 'error', 'warn' and 'debug'. .br Configuration Option: \fBrpmverbosity\fP -@@ -428,9 +818,7 @@ Configuration Option: \fBrpmverbosity\fP +@@ -428,9 +835,7 @@ Configuration Option: \fBrpmverbosity\fP Sets the maximum amount of time yum will wait before performing a command \- it randomizes over the time. .IP "\fB\-C, \-\-cacheonly\fP" Tells yum to run entirely from system cache - does not download or @@ -3496,7 +3532,7 @@ index 1a8202a..6794581 100644 .IP "\fB\-\-version\fP" Reports the \fByum\fP version number and installed package versions for everything in history_record_packages (can be added to by plugins). -@@ -461,8 +849,13 @@ processing logic. For more information see the \fBupdate\fP command above. +@@ -461,8 +866,13 @@ processing logic. For more information see the \fBupdate\fP command above. .br Configuration Option: \fBobsoletes\fP .IP "\fB\-x, \-\-exclude=package\fP" @@ -3512,7 +3548,7 @@ index 1a8202a..6794581 100644 .br .IP "\fB\-\-color=[always|auto|never]\fP" Display colorized output automatically, depending on the output terminal, -@@ -479,6 +872,13 @@ main == disable excludes defined in [main] in yum.conf +@@ -479,6 +889,13 @@ main == disable excludes defined in [main] in yum.conf .br repoid == disable excludes defined for that repo .br @@ -3526,7 +3562,7 @@ index 1a8202a..6794581 100644 .IP "\fB\-\-disableplugin=plugin\fP" Run with one or more plugins disabled, the argument is a comma separated list of wildcards to match against plugin names. -@@ -506,7 +906,15 @@ option will corrupt your cache (and you can use $releasever in your cachedir +@@ -506,7 +923,15 @@ option will corrupt your cache (and you can use $releasever in your cachedir configuration to stop this). .PP .IP "\fB\-t, \-\-tolerant\fP" @@ -3543,7 +3579,7 @@ index 1a8202a..6794581 100644 .br .IP "\fB\-\-setopt=option=value\fP" Set any config option in yum config or repo files. For options in the global -@@ -523,7 +931,7 @@ version of the package\&. +@@ -523,7 +948,7 @@ version of the package\&. The format of the output of yum list is: @@ -3552,7 +3588,7 @@ index 1a8202a..6794581 100644 .IP "\fByum list [all | glob_exp1] [glob_exp2] [\&.\&.\&.]\fP" List all available and installed packages\&. -@@ -542,14 +950,18 @@ shell\-style glob and any matches are printed\&. +@@ -542,14 +967,18 @@ shell\-style glob and any matches are printed\&. List the packages installed on the system that are not available in any yum repository listed in the config file. .IP @@ -3573,7 +3609,7 @@ index 1a8202a..6794581 100644 .IP .PP -@@ -658,7 +1070,7 @@ configuration options. +@@ -658,7 +1087,7 @@ configuration options. .I yum-complete-transaction (1) .I yumdownloader (1) .I yum-utils (1) @@ -184599,7 +184635,7 @@ index fba02c5..a9270e2 100755 diff --git a/utils.py b/utils.py old mode 100644 new mode 100755 -index ced6ba0..0b7191c +index ced6ba0..dbcd605 --- a/utils.py +++ b/utils.py @@ -13,6 +13,9 @@ @@ -184688,7 +184724,52 @@ index ced6ba0..0b7191c ps = {} for line in open("/proc/%d/status" % pid): if line[-1] != '\n': -@@ -106,7 +130,21 @@ def get_process_info(pid): +@@ -83,30 +107,54 @@ def get_process_info(pid): + return + if 'vmsize' not in ps: + return +- boot_time = None +- for line in open("/proc/stat"): +- if line.startswith("btime "): +- boot_time = int(line[len("btime "):-1]) +- break ++ boot_time = get_boot_time() + if boot_time is None: + return +- ps_stat = open("/proc/%d/stat" % pid).read().split() +- ps['utime'] = jiffies_to_seconds(ps_stat[13]) +- ps['stime'] = jiffies_to_seconds(ps_stat[14]) +- ps['cutime'] = jiffies_to_seconds(ps_stat[15]) +- ps['cstime'] = jiffies_to_seconds(ps_stat[16]) +- ps['start_time'] = boot_time + jiffies_to_seconds(ps_stat[21]) ++ ps.update(get_process_time(pid, boot_time)) ++ return ps ++ ++ ++def get_boot_time(): ++ for line in open("/proc/stat"): ++ if line.startswith("btime "): ++ return int(line[len("btime "):-1]) ++ ++ ++def get_process_time(pid, boot_time): ++ ps = {} ++ ps_stat = open("/proc/%d/stat" % pid).read().strip() ++ # Filename of the executable might contain spaces, so we throw it away ++ ps_stat = ps_stat[ps_stat.rfind(')') + 2:].split() ++ ps['utime'] = jiffies_to_seconds(ps_stat[11]) ++ ps['stime'] = jiffies_to_seconds(ps_stat[12]) ++ ps['cutime'] = jiffies_to_seconds(ps_stat[13]) ++ ps['cstime'] = jiffies_to_seconds(ps_stat[14]) ++ ps['start_time'] = boot_time + jiffies_to_seconds(ps_stat[19]) + ps['state'] = {'R' : _('Running'), + 'S' : _('Sleeping'), + 'D' : _('Uninterruptible'), + 'Z' : _('Zombie'), + 'T' : _('Traced/Stopped') +- }.get(ps_stat[2], _('Unknown')) ++ }.get(ps_stat[0], _('Unknown')) + return ps def show_lock_owner(pid, logger): @@ -184711,7 +184792,7 @@ index ced6ba0..0b7191c if not ps: return None -@@ -129,28 +167,9 @@ def show_lock_owner(pid, logger): +@@ -129,28 +177,9 @@ def show_lock_owner(pid, logger): return ps @@ -184742,7 +184823,7 @@ index ced6ba0..0b7191c def __init__(self,name,ver,usage): YumBaseCli.__init__(self) self._parser = YumOptionParser(base=self,utils=True,usage=usage) -@@ -167,11 +186,22 @@ class YumUtilBase(YumBaseCli): +@@ -167,11 +196,22 @@ class YumUtilBase(YumBaseCli): self.run_with_package_names.add("yum-utils") def exUserCancel(self): @@ -184765,7 +184846,7 @@ index ced6ba0..0b7191c if e.errno == 32: self.logger.critical(_('\n\nExiting on Broken Pipe')) else: -@@ -180,10 +210,13 @@ class YumUtilBase(YumBaseCli): +@@ -180,10 +220,13 @@ class YumUtilBase(YumBaseCli): return 1 def exPluginExit(self, e): @@ -184782,7 +184863,7 @@ index ced6ba0..0b7191c exitmsg = exception2msg(e) if exitmsg: self.logger.warn('\n\n%s', exitmsg) -@@ -191,11 +224,20 @@ class YumUtilBase(YumBaseCli): +@@ -191,11 +234,20 @@ class YumUtilBase(YumBaseCli): return 1 def exFatal(self, e): @@ -184803,7 +184884,7 @@ index ced6ba0..0b7191c try: self.closeRpmDB() self.doUnlock() -@@ -205,34 +247,31 @@ class YumUtilBase(YumBaseCli): +@@ -205,34 +257,31 @@ class YumUtilBase(YumBaseCli): def getOptionParser(self): @@ -184854,7 +184935,7 @@ index ced6ba0..0b7191c # Parse only command line options that affect basic yum setup opts = self._parser.firstParse(args) -@@ -305,8 +344,9 @@ class YumUtilBase(YumBaseCli): +@@ -305,8 +354,9 @@ class YumUtilBase(YumBaseCli): return opts def doUtilYumSetup(self): @@ -184866,7 +184947,7 @@ index ced6ba0..0b7191c # FIXME - we need another way to do this, I think. try: self.waitForLock() -@@ -319,6 +359,11 @@ class YumUtilBase(YumBaseCli): +@@ -319,6 +369,11 @@ class YumUtilBase(YumBaseCli): sys.exit(1) def doUtilBuildTransaction(self, unfinished_transactions_check=True): @@ -184878,7 +184959,7 @@ index ced6ba0..0b7191c try: (result, resultmsgs) = self.buildTransaction(unfinished_transactions_check = unfinished_transactions_check) except plugins.PluginYumExit, e: -@@ -361,6 +406,7 @@ class YumUtilBase(YumBaseCli): +@@ -361,6 +416,7 @@ class YumUtilBase(YumBaseCli): self.verbose_logger.log(logginglevels.INFO_2, _('\nDependencies Resolved')) def doUtilTransaction(self): @@ -192063,18 +192144,19 @@ index 65f6d5e..92e87ba 100755 print >> sys.stderr, "newcomps.py: No such file:\'%s\'" % sys.argv[1] sys.exit(1) diff --git a/yum/config.py b/yum/config.py -index d09511f..69f8e2e 100644 +index d09511f..7bb56d0 100644 --- a/yum/config.py +++ b/yum/config.py -@@ -38,6 +38,7 @@ if not _use_iniparse: +@@ -38,22 +38,30 @@ if not _use_iniparse: from ConfigParser import NoSectionError, NoOptionError, ParsingError from ConfigParser import ConfigParser import rpmUtils.transaction +import rpmUtils.miscutils import Errors import types - from misc import get_uuid, read_in_items_from_dot_dir -@@ -45,15 +46,22 @@ from misc import get_uuid, read_in_items_from_dot_dir +-from misc import get_uuid, read_in_items_from_dot_dir ++from misc import get_uuid_obj, read_in_items_from_dot_dir + # Alter/patch these to change the default checking... __pkgs_gpgcheck_default__ = False __repo_gpgcheck_default__ = False @@ -193068,7 +193150,8 @@ index d09511f..69f8e2e 100644 + startupconf.releasever = releasever + uuidfile = '%s/%s/uuid' % (startupconf.installroot, startupconf.persistdir) - startupconf.uuid = get_uuid(uuidfile) +- startupconf.uuid = get_uuid(uuidfile) ++ startupconf.uuid = get_uuid_obj(uuidfile) return startupconf @@ -194787,7 +194870,7 @@ index 0000000..e912ea1 + + return ret diff --git a/yum/history.py b/yum/history.py -index 5385bd1..6f60f54 100644 +index 5385bd1..3f20128 100644 --- a/yum/history.py +++ b/yum/history.py @@ -97,9 +97,58 @@ def _setupHistorySearchSQL(patterns=None, ignore_case=False): @@ -194945,15 +195028,24 @@ index 5385bd1..6f60f54 100644 self._conn = None self.conf = yum.misc.GenericHolder() -@@ -568,6 +666,8 @@ class YumHistory: +@@ -568,6 +666,9 @@ class YumHistory: self.conf.writable = False self.conf.readable = True + self.releasever = releasever + ++ self._db_file = None if not os.path.exists(self.conf.db_path): try: os.makedirs(self.conf.db_path) +@@ -580,7 +681,6 @@ class YumHistory: + self.conf.writable = True + + DBs = glob.glob('%s/history-*-*-*.sqlite' % self.conf.db_path) +- self._db_file = None + for d in reversed(sorted(DBs)): + fname = os.path.basename(d) + fname = fname[len("history-"):-len(".sqlite")] @@ -638,13 +738,15 @@ class YumHistory: return self._conn.cursor() def _commit(self): @@ -195667,6 +195759,20 @@ index 14c5e73..f441eb9 100644 # We didn't find the level in the table, check if it's smaller # than the smallest level if level < keys[0]: +diff --git a/yum/mdparser.py b/yum/mdparser.py +index 8631f06..8d0c678 100644 +--- a/yum/mdparser.py ++++ b/yum/mdparser.py +@@ -155,7 +155,8 @@ class PrimaryEntry(BaseEntry): + p[name] = child.text + + elif name in ('provides', 'requires', 'conflicts', +- 'obsoletes'): ++ 'obsoletes', ++ 'suggests', 'enhances', 'recommends', 'supplements'): + self.prco[name] = self.getPrco(child) + + elif name == 'header-range': diff --git a/yum/metalink.py b/yum/metalink.py index aaa4f25..a2c5135 100755 --- a/yum/metalink.py @@ -195710,7 +195816,7 @@ index aaa4f25..a2c5135 100755 continue diff --git a/yum/misc.py b/yum/misc.py -index 2f6ddfe..f551102 100644 +index 2f6ddfe..347a07a 100644 --- a/yum/misc.py +++ b/yum/misc.py @@ -5,9 +5,11 @@ Assorted utility functions for yum. @@ -195989,7 +196095,31 @@ index 2f6ddfe..f551102 100644 def get_my_lang_code(): -@@ -1105,17 +1129,28 @@ def decompress(filename, dest=None, fn_only=False, check_timestamps=False): +@@ -1077,6 +1101,23 @@ def get_uuid(savepath): + pass + + return myid ++ ++class _Dynamic_UUID(object): ++ def __init__(self, filename): ++ self.filename = filename ++ self.uuid = None ++ ++ def __str__(self): ++ if self.uuid is None: ++ self.uuid = get_uuid(self.filename) ++ return self.uuid ++ ++ def __unicode__(self): ++ return to_unicode(self.__str__()) ++ ++def get_uuid_obj(savepath): ++ """ Like get_uuid() but doesn't create the uuid file until it's needed. """ ++ return _Dynamic_UUID(savepath) + + def decompress(filename, dest=None, fn_only=False, check_timestamps=False): + """take a filename and decompress it into the same relative location. +@@ -1105,17 +1146,28 @@ def decompress(filename, dest=None, fn_only=False, check_timestamps=False): out = filename.replace('.xz', '') else: @@ -196026,7 +196156,7 @@ index 2f6ddfe..f551102 100644 return out -@@ -1123,13 +1158,14 @@ def repo_gen_decompress(filename, generated_name, cached=False): +@@ -1123,13 +1175,14 @@ def repo_gen_decompress(filename, generated_name, cached=False): """ This is a wrapper around decompress, where we work out a cached generated name, and use check_timestamps. filename _must_ be from a repo. and generated_name is the type of the file. """ @@ -196048,7 +196178,7 @@ index 2f6ddfe..f551102 100644 def read_in_items_from_dot_dir(thisglob, line_as_list=True): """takes a glob of a dir (like /etc/foo.d/*.foo) returns a list of all the lines in all the files matching -@@ -1175,3 +1211,22 @@ def cElementTree_xmlparse(filename): +@@ -1175,3 +1228,22 @@ def cElementTree_xmlparse(filename): """ Lazily load/run: cElementTree.parse """ _cElementTree_import() return __cached_cElementTree.parse(filename) @@ -196124,7 +196254,7 @@ index 4af563a..a702ac1 100644 self.obsoletes = {} #obs[obsoletename] = [pkg1, pkg2, pkg3] #the package lists are packages that obsolete the key name diff --git a/yum/packages.py b/yum/packages.py -index 5ef9951..1b3061b 100644 +index 5ef9951..ccac9da 100644 --- a/yum/packages.py +++ b/yum/packages.py @@ -38,6 +38,7 @@ import struct @@ -196135,7 +196265,17 @@ index 5ef9951..1b3061b 100644 import urlparse urlparse.uses_fragment.append("media") from urlgrabber.grabber import URLGrabber, URLGrabError -@@ -106,14 +107,16 @@ def buildPkgRefDict(pkgs, casematch=True): +@@ -53,6 +54,9 @@ except ImportError: + import pwd + import grp + ++# check if rpm has the new weakdeps tags ++_rpm_has_new_weakdeps = hasattr(rpm, 'RPMTAG_ENHANCENAME') ++ + def comparePoEVR(po1, po2): + """ + Compare two Package or PackageEVR objects. +@@ -106,14 +110,16 @@ def buildPkgRefDict(pkgs, casematch=True): return pkgdict def parsePackages(pkgs, usercommands, casematch=0, @@ -196154,7 +196294,7 @@ index 5ef9951..1b3061b 100644 exactmatch = [] matched = [] unmatched = [] -@@ -130,11 +133,10 @@ def parsePackages(pkgs, usercommands, casematch=0, +@@ -130,11 +136,10 @@ def parsePackages(pkgs, usercommands, casematch=0, trylist = pkgdict.keys() # command and pkgdict are already lowered if not casematch # so case sensitive is always fine @@ -196168,7 +196308,7 @@ index 5ef9951..1b3061b 100644 matched.extend(pkgdict[item]) del pkgdict[item] foundit = 1 -@@ -223,6 +225,10 @@ class FakeRepository: +@@ -223,6 +228,10 @@ class FakeRepository: def __str__(self): return self.id @@ -196179,7 +196319,7 @@ index 5ef9951..1b3061b 100644 # Goal for the below is to have a packageobject that can be used by generic # functions independent of the type of package - ie: installed or available -@@ -243,34 +249,87 @@ class PackageObject(object): +@@ -243,34 +252,87 @@ class PackageObject(object): def _ui_envra(self): if self.epoch == '0': @@ -196287,7 +196427,18 @@ index 5ef9951..1b3061b 100644 def __str__(self): return self.ui_envra -@@ -481,15 +540,14 @@ class RpmBase(object): +@@ -411,6 +473,10 @@ class RpmBase(object): + self.prco['conflicts'] = [] # (name, flag, (e,v,r)) + self.prco['requires'] = [] # (name, flag, (e,v,r)) + self.prco['provides'] = [] # (name, flag, (e,v,r)) ++ self.prco['suggests'] = [] # (name, flag, (e,v,r)) ++ self.prco['enhances'] = [] # (name, flag, (e,v,r)) ++ self.prco['recommends'] = [] # (name, flag, (e,v,r)) ++ self.prco['supplements'] = [] # (name, flag, (e,v,r)) + self.files = {} + self.files['file'] = [] + self.files['dir'] = [] +@@ -481,15 +547,14 @@ class RpmBase(object): if prcotuple in self._prco_lookup[prcotype]: return 1 @@ -196311,7 +196462,7 @@ index 5ef9951..1b3061b 100644 return 0 -@@ -611,15 +669,18 @@ class RpmBase(object): +@@ -611,15 +676,20 @@ class RpmBase(object): dirlist = property(fget=lambda self: self.returnFileEntries(ftype='dir')) ghostlist = property(fget=lambda self: self.returnFileEntries(ftype='ghost')) requires = property(fget=lambda self: self.returnPrco('requires')) @@ -196319,6 +196470,8 @@ index 5ef9951..1b3061b 100644 provides = property(fget=lambda self: self.returnPrco('provides')) obsoletes = property(fget=lambda self: self.returnPrco('obsoletes')) conflicts = property(fget=lambda self: self.returnPrco('conflicts')) ++ # weak_requires = property(fget=lambda self: self.returnPrco('recommends')) ++ # info_requires = property(fget=lambda self: self.returnPrco('suggests')) provides_names = property(fget=lambda self: self.returnPrcoNames('provides')) requires_names = property(fget=lambda self: self.returnPrcoNames('requires')) + strong_requires_names = property(fget=lambda self: self.returnPrcoNames('strong_requires')) @@ -196330,7 +196483,7 @@ index 5ef9951..1b3061b 100644 conflicts_print = property(fget=lambda self: self.returnPrco('conflicts', True)) obsoletes_print = property(fget=lambda self: self.returnPrco('obsoletes', True)) changelog = property(fget=lambda self: self.returnChangelog()) -@@ -737,7 +798,7 @@ class YumAvailablePackage(PackageObject, RpmBase): +@@ -737,7 +807,7 @@ class YumAvailablePackage(PackageObject, RpmBase): """ This reports the repo the package is from, we integrate YUMDB info. for RPM packages so a package from "fedora" that is installed has a ui_from_repo of "@fedora". Note that, esp. with the --releasever @@ -196339,7 +196492,7 @@ index 5ef9951..1b3061b 100644 So we also check against the current releasever and if it is different we also print the YUMDB releasever. This means that installing from F12 fedora, while running F12, would report as -@@ -789,7 +850,7 @@ class YumAvailablePackage(PackageObject, RpmBase): +@@ -789,7 +859,7 @@ class YumAvailablePackage(PackageObject, RpmBase): size = property(fget=lambda self: self._size()) remote_path = property(_remote_path) @@ -196348,7 +196501,7 @@ index 5ef9951..1b3061b 100644 def _committer(self): "Returns the name of the last person to do a commit to the changelog." -@@ -797,22 +858,14 @@ class YumAvailablePackage(PackageObject, RpmBase): +@@ -797,22 +867,14 @@ class YumAvailablePackage(PackageObject, RpmBase): if hasattr(self, '_committer_ret'): return self._committer_ret @@ -196373,7 +196526,7 @@ index 5ef9951..1b3061b 100644 # Hacky way to get rid of version numbers... ix = val.find('> ') if ix != -1: -@@ -1063,10 +1116,10 @@ class YumAvailablePackage(PackageObject, RpmBase): +@@ -1063,10 +1125,10 @@ class YumAvailablePackage(PackageObject, RpmBase): packager = url = '' if self.packager: @@ -196386,7 +196539,7 @@ index 5ef9951..1b3061b 100644 (csum_type, csum, csumid) = self.checksums[0] msg = """ %s -@@ -1080,10 +1133,10 @@ class YumAvailablePackage(PackageObject, RpmBase): +@@ -1080,10 +1142,10 @@ class YumAvailablePackage(PackageObject, RpmBase):