rpms/yum/devel yum-HEAD.patch,1.48,1.49 yum.spec,1.306,1.307

James Antill james at fedoraproject.org
Sat Apr 10 21:23:06 UTC 2010


Author: james

Update of /cvs/pkgs/rpms/yum/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv24751

Modified Files:
	yum-HEAD.patch yum.spec 
Log Message:
* Sat Apr 10 2010 James Antill <james at fedoraproject.org> - 3.2.27-5
- Latest yum-3_2_X head.
- Remove the broken assert in sqlitesack


yum-HEAD.patch:
 b/Makefile              |    2 
 b/cli.py                |   63 ++
 b/docs/yum.8            |   10 
 b/docs/yum.conf.5       |    5 
 b/etc/yum.bash          |    7 
 b/output.py             |   39 +
 b/po/fi.po              |  204 ++++-----
 b/po/ru.po              |   13 
 b/rpmUtils/miscutils.py |   45 +-
 b/rpmUtils/oldUtils.py  |    2 
 b/test/depsolvetests.py |   16 
 b/test/testbase.py      |    2 
 b/utils.py              |    3 
 b/yum.spec              |    3 
 b/yum/__init__.py       |   11 
 b/yum/config.py         |    3 
 b/yum/depsolve.py       |   12 
 b/yum/history.py        |   35 +
 b/yum/logginglevels.py  |    3 
 b/yum/misc.py           |    9 
 b/yum/packageSack.py    |   32 -
 b/yum/packages.py       |   16 
 b/yum/pgpmsg.py         |    3 
 b/yum/rpmsack.py        |   17 
 b/yum/sqlitesack.py     |   27 +
 b/yum/update_md.py      |    5 
 b/yum/yumRepo.py        |    9 
 b/yumcommands.py        |   23 +
 cli.py                  |   56 ++
 docs/yum.8              |   31 +
 docs/yum.conf.5         |   35 +
 etc/yum.bash            |    5 
 output.py               |   11 
 po/ru.po                | 1038 ++++++++++++++++++++++--------------------------
 yum.spec                |    5 
 yum/__init__.py         |   39 +
 yum/config.py           |   36 +
 yum/depsolve.py         |   33 -
 yum/logginglevels.py    |   51 +-
 yum/packages.py         |   15 
 yum/pgpmsg.py           |    4 
 yum/rpmsack.py          |   32 +
 yum/sqlitesack.py       |   15 
 yumcommands.py          |    7 
 44 files changed, 1177 insertions(+), 855 deletions(-)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.48 -r 1.49 yum-HEAD.patchIndex: yum-HEAD.patch
===================================================================
RCS file: /cvs/pkgs/rpms/yum/devel/yum-HEAD.patch,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -p -r1.48 -r1.49
--- yum-HEAD.patch	8 Apr 2010 21:18:42 -0000	1.48
+++ yum-HEAD.patch	10 Apr 2010 21:23:02 -0000	1.49
@@ -1,453 +1,138 @@
-diff --git a/cli.py b/cli.py
-index f5ed53d..1678e65 100644
---- a/cli.py
-+++ b/cli.py
-@@ -100,6 +100,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
-         self.registerCommand(yumcommands.VersionCommand())
-         self.registerCommand(yumcommands.HistoryCommand())
-         self.registerCommand(yumcommands.CheckRpmdbCommand())
-+        self.registerCommand(yumcommands.DistroSyncCommand())
+From cc5d13a39dcefbc401255d224c8700f4f907f285 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta at iki.fi>
+Date: Mon, 22 Mar 2010 19:31:43 +0200
+Subject: [PATCH 01/48] Fix unknown syslog facility mapping.
+
+---
+ yum/logginglevels.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/yum/logginglevels.py b/yum/logginglevels.py
+index 6c23f88..3d82b55 100644
+--- a/yum/logginglevels.py
++++ b/yum/logginglevels.py
+@@ -75,7 +75,7 @@ def syslogFacilityMap(facility):
+     elif (facility.upper().startswith("LOG_") and
+           facility[4:].upper() in _syslog_facility_map):
+         return _syslog_facility_map[facility[4:].upper()]
+-    return syslog.LOG_USER
++    return syslog_module.LOG_USER
  
-     def registerCommand(self, command):
-         for name in command.getNames():
-@@ -149,7 +150,34 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
-                 usage += "%s\n" % command.getNames()[0]
+ def logLevelFromErrorLevel(error_level):
+     """ Convert an old-style error logging level to the new style. """
+-- 
+1.6.6.1
+
+
+From 11dfde5e065e21c5bdb25a087501b90afe0b0dab Mon Sep 17 00:00:00 2001
+From: Seth Vidal <skvidal at fedoraproject.org>
+Date: Tue, 23 Mar 2010 10:09:20 -0400
+Subject: [PATCH 02/48] make sure we aren't overwriting the value of 'keys'
+
+this determines how many args we pass back in our yielded results
+never noticed it b/c nothing in yum uses keys=True - but it broke PK
+---
+ yum/__init__.py |   10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/yum/__init__.py b/yum/__init__.py
+index ea73549..0aaa819 100644
+--- a/yum/__init__.py
++++ b/yum/__init__.py
+@@ -2163,10 +2163,10 @@ class YumBase(depsolve.Depsolve):
  
-         return usage
--
-+    
-+    def _parseSetOpts(self, setopts):
-+        """parse the setopts list handed to us and saves the results as
-+           repo_setopts and main_setopts in the yumbase object"""
-+
-+        repoopts = {}
-+        mainopts = yum.misc.GenericHolder()
-+        mainopts.items = []
-+
-+        for item in setopts:
-+            k,v = item.split('=')
-+            period = k.find('.') 
-+            if period != -1:
-+                repo = k[:period]
-+                k = k[period+1:]
-+                if repo not in repoopts:
-+                   repoopts[repo] = yum.misc.GenericHolder()
-+                   repoopts[repo].items = []
-+                setattr(repoopts[repo], k, v)
-+                repoopts[repo].items.append(k)
-+            else:
-+                setattr(mainopts, k, v)
-+                mainopts.items.append(k)
-+        
-+        self.main_setopts = mainopts
-+        self.repo_setopts = repoopts
-+        
-+        
-     def getOptionsConfig(self, args):
-         """parses command line arguments, takes cli args:
-         sets up self.conf and self.cmds as well as logger objects 
-@@ -166,6 +194,13 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
-             opts.quiet = True
-             opts.verbose = False
+         # do the ones we already have
+         for item in sorted_lists.values():
+-            for pkg, keys, values in item:
++            for pkg, k, v in item:
+                 if pkg not in results_by_pkg:
+                     results_by_pkg[pkg] = []
+-                results_by_pkg[pkg].append((keys,values))
++                results_by_pkg[pkg].append((k,v))
  
-+        # go through all the setopts and set the global ones
-+        self._parseSetOpts(opts.setopts)
-+        
-+        if self.main_setopts:
-+            for opt in self.main_setopts.items:
-+                setattr(opts, opt, getattr(self.main_setopts, opt))
-+            
-         # get the install root to use
-         root = self.optparser.getRoot(opts)
+         # take our existing dict-by-pkg and make the dict-by-count for 
+         # this bizarro sorted_lists format
+@@ -2175,9 +2175,9 @@ class YumBase(depsolve.Depsolve):
+         for pkg in results_by_pkg:
+             totkeys = []
+             totvals = []
+-            for (keys, values) in results_by_pkg[pkg]:
+-                totkeys.extend(keys)
+-                totvals.extend(values)
++            for (k, v) in results_by_pkg[pkg]:
++                totkeys.extend(k)
++                totvals.extend(v)
+             
+             totkeys = misc.unique(totkeys)
+             totvals = misc.unique(totvals)
+-- 
+1.6.6.1
+
+
+From c6f4d336bd6be5cdb575c94628da2eb7bcb900f4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta at iki.fi>
+Date: Mon, 22 Mar 2010 19:56:44 +0200
+Subject: [PATCH 03/48] Use LOG_USER as default syslog facility everywhere in base.
+
+---
+ yum/config.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/yum/config.py b/yum/config.py
+index ad8db7e..cb01306 100644
+--- a/yum/config.py
++++ b/yum/config.py
+@@ -601,7 +601,7 @@ class StartupConf(BaseConfig):
+     pluginconfpath = ListOption(['/etc/yum/pluginconf.d'])
+     gaftonmode = BoolOption(False)
+     syslog_ident = Option()
+-    syslog_facility = Option('LOG_DAEMON')
++    syslog_facility = Option('LOG_USER')
+     persistdir = Option('/var/lib/yum')
+     
+ class YumConf(StartupConf):
+-- 
+1.6.6.1
+
+
+From 40a53f0d3a8dd8ad4fb4802890e4f30b0214f3f9 Mon Sep 17 00:00:00 2001
+From: Ville-Pekka Vainio <vpivaini at cs.helsinki.fi>
+Date: Wed, 24 Mar 2010 12:37:03 +0000
+Subject: [PATCH 04/48] l10n: Updates to Finnish (fi) translation
+
+Transmitted-via: Transifex (www.transifex.net)
+---
+ po/fi.po |  203 +++++++++++++++++++++++++++++++------------------------------
+ 1 files changed, 103 insertions(+), 100 deletions(-)
+
+diff --git a/po/fi.po b/po/fi.po
+index 4347eba..4240973 100644
+--- a/po/fi.po
++++ b/po/fi.po
+@@ -6,8 +6,8 @@ msgid ""
+ msgstr ""
+ "Project-Id-Version: yum\n"
+ "Report-Msgid-Bugs-To: \n"
+-"POT-Creation-Date: 2010-02-10 10:43-0500\n"
+-"PO-Revision-Date: 2010-02-11 21:50+0200\n"
++"POT-Creation-Date: 2010-02-11 10:54-0500\n"
++"PO-Revision-Date: 2010-03-24 14:36+0200\n"
+ "Last-Translator: Ville-Pekka Vainio <vpivaini at cs.helsinki.fi>\n"
+ "Language-Team: Finnish <laatu at lokalisointi.org>\n"
+ "MIME-Version: 1.0\n"
+@@ -156,15 +156,15 @@ msgstr "Ladataan paketteja:"
+ msgid "Error Downloading Packages:\n"
+ msgstr "Virhe pakettien latauksessa:\n"
  
-@@ -189,7 +224,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
-             pc.enabled_plugins  = self.optparser._splitArg(opts.enableplugins)
-             pc.releasever = opts.releasever
-             self.conf
--                    
-+            
-+            # now set  all the non-first-start opts from main from our setopts
[...4926 lines suppressed...]
-             # Mark all the processed pkgnames as fully loaded
-             self._pkgnames_loaded.update([po.name for po in returnList])
-+        if need_full:
-+            for (pat, rest) in patterns:
-+                if rest == 'glob':
-+                    continue
-+                assert rest == '='
-+                for pkg in returnList:
-+                    if pkg.name == pat:
-+                        self._pkgnames_loaded.add(pkg.name)
-+                        break
-+        if not returnList:
-+            for (pat, rest) in patterns:
-+                self._pkgmatch_fails.add(pat)
+diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
+index 54e7bf9..f4ce88d 100644
+--- a/docs/yum.conf.5
++++ b/docs/yum.conf.5
+@@ -771,16 +771,17 @@ configuration file variable will not be replaced.
  
-         return returnList
-                 
-diff --git a/yum/update_md.py b/yum/update_md.py
-index 54d4cd7..fc051b0 100644
---- a/yum/update_md.py
-+++ b/yum/update_md.py
-@@ -335,13 +335,15 @@ class UpdateMetadata(object):
-     # has a BZ fix notice. All you can see is the BZ notice for the new "pkg-3"
-     # with the above.
-     #  So now instead you lookup based on the _installed_ pkg.pkgtup, and get
--    # two notices, in order: [(pkg-3, notice), (pkg-2, notice)]
-+    # two notices, in order: [(pkgtup-3, notice), (pkgtup-2, notice)]
-     # the reason for the sorting order is that the first match will give you
-     # the minimum pkg you need to move to.
-     def get_applicable_notices(self, pkgtup):
-         """
-         Retrieve any update notices which are newer than a
-         given std. pkgtup (name, arch, epoch, version, release) tuple.
-+        Returns: list of (pkgtup, notice) that are newer than the given pkgtup,
-+                 in the order of newest pkgtups first.
-         """
-         oldpkgtup = pkgtup
-         name = oldpkgtup[0]
-diff --git a/yum/yumRepo.py b/yum/yumRepo.py
-index 8d7617e..b67b897 100644
---- a/yum/yumRepo.py
-+++ b/yum/yumRepo.py
-@@ -1552,9 +1552,17 @@ class YumRepository(Repository, config.RepoConf):
-         try:
-             checkfunc = (self.checkMD, (mdtype,), {})
-             text = "%s/%s" % (self.id, mdtype)
-+            if thisdata.size is None:
-+                reget = None
-+            else:
-+                reget = 'simple'
-+                if os.path.exists(local):
-+                    if os.stat(local).st_size >= int(thisdata.size):
-+                        misc.unlink_f(local)
-             local = self._getFile(relative=remote,
-                                   local=local, 
-                                   copy_local=1,
-+                                  reget=reget,
-                                   checkfunc=checkfunc, 
-                                   text=text,
-                                   cache=self.http_caching == 'all',
-diff --git a/yumcommands.py b/yumcommands.py
-index 35bd97c..88c047f 100644
---- a/yumcommands.py
-+++ b/yumcommands.py
-@@ -205,6 +205,28 @@ class UpdateCommand(YumCommand):
-         except yum.Errors.YumBaseError, e:
-             return 1, [str(e)]
+ .LP
+ As of 3.2.28, any file in <installroot>/<persistdir>/vars is turned into
+-a variable named after the filename (or overrides any of the above varaibles).
++a variable named after the filename (or overrides any of the above variables).
+ The obvious exception is that you cannot use these variables in the definition
+ of persistdir itself.
+ 
+ Note that no warnings/errors are given if the files are unreadable, so creating
+ files that only root can read may be confusing for users.
+ 
+-Also note that all new line characters are removed, as a convienience, but no
+-other checking is performed on the data. This means it's possible to have bad
+-character data in baseurl etc.
++Also note that only the first line will be read and all new line 
++characters are removed, as a convenience. However, no other checking is 
++performed on the data. This means it is possible to have bad character 
++data in any value.
  
-+class DistroSyncCommand(YumCommand):
-+    def getNames(self):
-+        return ['distribution-synchronization', 'distro-sync']
+ .SH "FILES"
+ .nf
+diff --git a/yum.spec b/yum.spec
+index 3a724cd..48e5fea 100644
+--- a/yum.spec
++++ b/yum.spec
+@@ -91,6 +91,11 @@ exit 0
+ /usr/lib/python?.?/site-packages/rpmUtils
+ %dir /var/cache/yum
+ %dir /var/lib/yum
++%dir /var/lib/yum/vars
++%ghost /var/lib/yum/uuid
++%ghost /var/lib/yum/history
++%ghost /var/lib/yum/plugins
++%ghost /var/lib/yum/yumdb
+ %{_mandir}/man*/yum.*
+ %{_mandir}/man*/yum-shell*
+ 
+diff --git a/yum/config.py b/yum/config.py
+index e13eb12..ea8bcbf 100644
+--- a/yum/config.py
++++ b/yum/config.py
+@@ -882,8 +882,12 @@ def readMainConfig(startupconf):
+     except OSError:
+         fsvars = []
+     for fsvar in fsvars:
++        if os.path.link(dir_fsvars + fsvar):
++            continue
+         try:
+-            val = open(dir_fsvars + fsvar).read().replace('\n', '')
++            val = open(dir_fsvars + fsvar).readline()
++            if val and val[-1] == '\n':
++                val = val[:-1]
+         except (OSError, IOError):
+             continue
+         yumvars[fsvar] = val
+-- 
+1.6.6.1
+
+
+From cf43ce922a58f6514a7bc76cdc326a89134379fc Mon Sep 17 00:00:00 2001
+From: James Antill <james at and.org>
+Date: Fri, 9 Apr 2010 16:59:16 -0400
+Subject: [PATCH 48/48] Add more docs for version command
+
+---
+ docs/yum.8 |   20 +++++++++++++++++++-
+ 1 files changed, 19 insertions(+), 1 deletions(-)
+
+diff --git a/docs/yum.8 b/docs/yum.8
+index d36b1cc..6761f1c 100644
+--- a/docs/yum.8
++++ b/docs/yum.8
+@@ -69,7 +69,7 @@ gnome\-packagekit application\&.
+ .br
+ .I \fR * repolist [all|enabled|disabled] 
+ .br
+-.I \fR * version [all|installed|available|group-*|grouplist|groupinfo]
++.I \fR * version [ all | installed | available | group-* | nogroups* | grouplist | groupinfo ]
+ .br
+ .I \fR * history [info|list|summary|redo|undo|new] 
+ .br
+@@ -266,6 +266,24 @@ information is listed. The version is calculated by taking a sha1 hash of the
+ 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).
 +
-+    def getUsage(self):
-+        return _("[PACKAGE...]")
++The version command will now show "groups" of packages as a separate version,
++and so takes sub-commands:
 +
-+    def getSummary(self):
-+        return _("Synchronize installed packages to the latest available versions")
++"version grouplist" - List the defined version groups.
 +
-+    def doCheck(self, base, basecmd, extcmds):
-+        checkRootUID(base)
-+        checkGPGKey(base)
++"version groupinfo" - Get the complete list of packages within one or more version groups.
 +
-+    def doCommand(self, base, basecmd, extcmds):
-+        self.doneCommand(base, _("Setting up Distribution Synchronization Process"))
-+        try:
-+            base.conf.obsoletes = 1
-+            return base.distroSyncPkgs(extcmds)
-+        except yum.Errors.YumBaseError, e:
-+            return 1, [str(e)]
++"version installed" - This is the default, only show the version information for installed packages.
 +
- def _add_pkg_simple_list_lens(data, pkg, indent=''):
-     """ Get the length of each pkg's column. Add that to data.
-         This "knows" about simpleList and printVer. """
++"version available" - Only show the version information for available packages.
++
++"version all" - Show the version information for installed and available packages.
++
++"version nogroups | nogroups-*" - Just show the main version information.
++
++"version group-*" - Just show the grouped version information, if more arguments are given then only show the data for those groups.
++
+ .IP
+ .IP "\fBhistory\fP"
+ The history command allows the user to view what has happened in past
+-- 
+1.6.6.1
+


Index: yum.spec
===================================================================
RCS file: /cvs/pkgs/rpms/yum/devel/yum.spec,v
retrieving revision 1.306
retrieving revision 1.307
diff -u -p -r1.306 -r1.307
--- yum.spec	8 Apr 2010 21:18:43 -0000	1.306
+++ yum.spec	10 Apr 2010 21:23:06 -0000	1.307
@@ -3,7 +3,7 @@
 Summary: RPM installer/updater
 Name: yum
 Version: 3.2.27
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: GPLv2+
 Group: System Environment/Base
 Source0: http://yum.baseurl.org/download/3.2/%{name}-%{version}.tar.gz
@@ -110,6 +110,10 @@ rm -rf $RPM_BUILD_ROOT
 %dir /usr/lib/yum-plugins
 
 %changelog
+* Sat Apr 10 2010 James Antill <james at fedoraproject.org> - 3.2.27-5
+- Latest yum-3_2_X head.
+- Remove the broken assert in sqlitesack
+
 * Thu Apr  8 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.27-4
 - more latest headness
 



More information about the scm-commits mailing list