rpms/yum/devel yum-HEAD.patch,1.56,1.57 yum.spec,1.317,1.318

Seth Vidal skvidal at fedoraproject.org
Wed May 26 21:03:27 UTC 2010


Author: skvidal

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

Modified Files:
	yum-HEAD.patch yum.spec 
Log Message:
latest HEAD



yum-HEAD.patch:
 Makefile                     |    2 
 cli.py                       |  140 +++
 docs/yum.8                   |   53 +
 docs/yum.conf.5              |   45 +
 etc/Makefile                 |    2 
 etc/yum.bash                 |   19 
 output.py                    |  115 ++
 po/fi.po                     |  203 ++---
 po/pt_BR.po                  | 1723 +++++++++++++++++++++++++------------------
 po/ru.po                     |  783 ++++++++++---------
 po/sv.po                     | 1449 ++++++++++++++++++++----------------
 rpmUtils/miscutils.py        |   55 -
 rpmUtils/oldUtils.py         |    2 
 rpmUtils/transaction.py      |    7 
 rpmUtils/updates.py          |   53 -
 test/depsolvetests.py        |   15 
 test/simpleobsoletestests.py |   23 
 test/simpleupdatetests.py    |   45 +
 test/testbase.py             |   13 
 test/yum-leak-test.py        |   96 ++
 test/yum-pylintrc            |    3 
 utils.py                     |   19 
 yum-updatesd.py              |    8 
 yum.spec                     |   26 
 yum/__init__.py              |  336 ++++++--
 yum/comps.py                 |   21 
 yum/config.py                |   78 +
 yum/depsolve.py              |  126 ++-
 yum/history.py               |  316 +++++++
 yum/logginglevels.py         |   44 -
 yum/mdparser.py              |    2 
 yum/misc.py                  |   34 
 yum/packageSack.py           |   69 +
 yum/packages.py              |  139 ++-
 yum/pgpmsg.py                |   19 
 yum/pkgtag_db.py             |    4 
 yum/repoMDObject.py          |   94 ++
 yum/repos.py                 |    2 
 yum/rpmsack.py               |  181 ++++
 yum/sqlitesack.py            |   96 ++
 yum/transactioninfo.py       |   52 +
 yum/update_md.py             |   10 
 yum/yumRepo.py               |   30 
 yumcommands.py               |   35 
 44 files changed, 4361 insertions(+), 2226 deletions(-)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.56 -r 1.57 yum-HEAD.patchIndex: yum-HEAD.patch
===================================================================
RCS file: /cvs/pkgs/rpms/yum/devel/yum-HEAD.patch,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -p -r1.56 -r1.57
--- yum-HEAD.patch	13 May 2010 22:18:27 -0000	1.56
+++ yum-HEAD.patch	26 May 2010 21:03:23 -0000	1.57
@@ -1,8264 +1,5661 @@
-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 001/127] 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 logLevelFromErrorLevel(error_level):
-     """ Convert an old-style error logging level to the new style. """
--- 
-1.7.0.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 002/127] 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):
- 
-         # 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))
- 
-         # 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.7.0.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 003/127] 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.7.0.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 004/127] 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"
- 
--#: ../cli.py:426 ../yum/__init__.py:4194
-+#: ../cli.py:426 ../yum/__init__.py:4195
- msgid "Running rpm_check_debug"
- msgstr "Suoritetaan rpm_check_debug"
+diff --git a/Makefile b/Makefile
+index d75b220..8065899 100644
+--- a/Makefile
++++ b/Makefile
+@@ -34,7 +34,7 @@ install:
+ 	install -m 755 bin/yum-updatesd.py $(DESTDIR)/usr/sbin/yum-updatesd
  
--#: ../cli.py:435 ../yum/__init__.py:4203
-+#: ../cli.py:435 ../yum/__init__.py:4204
- msgid "ERROR You need to update rpm to handle:"
- msgstr "VIRHE RPM on päivitettävä, jotta se osaa käsitellä:"
+ 	mkdir -p $(DESTDIR)/var/cache/yum
+-	mkdir -p $(DESTDIR)/var/lib/yum	
++	mkdir -p $(DESTDIR)/var/lib/yum
  
--#: ../cli.py:437 ../yum/__init__.py:4206
-+#: ../cli.py:437 ../yum/__init__.py:4207
- msgid "ERROR with rpm_check_debug vs depsolve:"
- msgstr "VIRHE rpm_check_debugin ja riippuvuuksien tarkistuksen välillä:"
+ 	for d in $(SUBDIRS); do make PYTHON=$(PYTHON) DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done
  
-@@ -339,7 +339,7 @@ msgstr "Saatavilla olevat ryhmät:"
- msgid "Done"
- msgstr "Valmis"
+diff --git a/cli.py b/cli.py
+index f5ed53d..2f1479b 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())
  
--#: ../cli.py:988 ../cli.py:1006 ../cli.py:1012 ../yum/__init__.py:2787
-+#: ../cli.py:988 ../cli.py:1006 ../cli.py:1012 ../yum/__init__.py:2788
- #, python-format
- msgid "Warning: Group %s does not exist."
- msgstr "Varoitus: Ryhmää %s ei ole olemassa."
-@@ -355,7 +355,7 @@ msgstr ""
- msgid "%d Package(s) to Install"
- msgstr "%d pakettia asennettavana"
+     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]
  
--#: ../cli.py:1028 ../yum/__init__.py:2799
-+#: ../cli.py:1028 ../yum/__init__.py:2800
- #, python-format
- msgid "No group named %s exists"
- msgstr "Ryhmää nimeltä %s ei ole olemassa"
-@@ -767,7 +767,7 @@ msgstr "Koko yhteensä: %s"
- #: ../output.py:904
- #, python-format
- msgid "Total download size: %s"
--msgstr "Latausmäärä yhteensä: %s"
-+msgstr "Ladattavaa yhteensä: %s"
+         return usage
+-
++    
[...27101 lines suppressed...]
-+        if self._cached_rpmdb_mtime is None:
-+            return # We haven't loaded any packages!!!
+         if self.cache == 1:
+             if os.path.exists(local):
+@@ -1552,9 +1550,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..dcf72db 100644
+--- a/yumcommands.py
++++ b/yumcommands.py
+@@ -205,6 +205,28 @@ class UpdateCommand(YumCommand):
+         except yum.Errors.YumBaseError, e:
+             return 1, [str(e)]
+ 
++class DistroSyncCommand(YumCommand):
++    def getNames(self):
++        return ['distribution-synchronization', 'distro-sync']
 +
-+        rpmdbfname  = self.root + "/var/lib/rpm/Packages"
-+        if not os.path.exists(rpmdbfname):
-+            return # haha
++    def getUsage(self):
++        return _("[PACKAGE...]")
 +
-+        _cached_rpmdb_mtime = os.path.getmtime(rpmdbfname)
-+        if self._cached_rpmdb_mtime != _cached_rpmdb_mtime:
-+            #  Something altered the rpmdb since we loaded our first package,
-+            # so don't save the rpmdb version as who knows what happened.
-+            return
++    def getSummary(self):
++        return _("Synchronize installed packages to the latest available versions")
 +
-         rpmdbvfname = self._cachedir + "/version"
-         if not os.access(self._cachedir, os.W_OK):
-             if os.path.exists(self._cachedir):
-@@ -1073,6 +1089,10 @@ class RPMDBPackageSack(PackageSackBase):
-         self._idx2pkg[index] = po
-         self._name2pkg.setdefault(po.name, []).append(po)
-         self._tup2pkg[po.pkgtup] = po
-+        if self.__cache_rpmdb__ and self._cached_rpmdb_mtime is None:
-+            rpmdbfname  = self.root + "/var/lib/rpm/Packages"
-+            self._cached_rpmdb_mtime = os.path.getmtime(rpmdbfname)
++    def doCheck(self, base, basecmd, extcmds):
++        checkRootUID(base)
++        checkGPGKey(base)
 +
-         return po
-         
-     def _hdr2pkgTuple(self, hdr):
--- 
-1.7.0.1
-
-
-From d26c78e7ed4fb564e2bb7e709d8847d27cd82389 Mon Sep 17 00:00:00 2001
-From: James Antill <james at and.org>
-Date: Thu, 13 May 2010 17:47:00 -0400
-Subject: [PATCH 127/127] Deal with bad rpmdb caches better eg. BZ 591382
-
----
- yum/rpmsack.py |   30 +++++++++++++++++++++++++++++-
- 1 files changed, 29 insertions(+), 1 deletions(-)
-
-diff --git a/yum/rpmsack.py b/yum/rpmsack.py
-index d6bd5c9..ef3343a 100644
---- a/yum/rpmsack.py
-+++ b/yum/rpmsack.py
-@@ -518,6 +518,27 @@ class RPMDBPackageSack(PackageSackBase):
-         rpmdbv = self.simpleVersion(main_only=True)[0]
-         self._write_conflicts_new(pkgs, rpmdbv)
- 
-+    def _deal_with_bad_rpmdbcache(self, caller):
-+        """ This shouldn't be called, but people are hitting weird stuff so
-+            we want to deal with it so it doesn't stay broken "forever". """
-+        misc.unlink_f(self._cachedir + "/version")
-+        misc.unlink_f(self._cachedir + '/conflicts')
-+        misc.unlink_f(self._cachedir + '/file-requires')
-+        misc.unlink_f(self._cachedir + '/yumdb-package-checksums')
-+        #  We have a couple of options here, we can:
-+        #
-+        # . Ignore it and continue - least invasive, least likely to get any
-+        #   bugs fixed.
-+        #
-+        # . Ignore it and continue, when not in debug mode - Helps users doing
-+        #   weird things (and we won't know), but normal bugs will be seen by
-+        #   anyone not running directly from a package.
-+        #
-+        # . Always throw - but at least it shouldn't happen again.
-+        #
-+        if __debug__:
-+            raise Errors.PackageSackError, 'Rpmdb checksum is invalid: %s' % caller
++    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)]
 +
-     def _read_conflicts(self):
-         if not self.__cache_rpmdb__:
-             return None
-@@ -550,6 +571,7 @@ class RPMDBPackageSack(PackageSackBase):
-             if fo.readline() != '': # Should be EOF
-                 return None
-         except ValueError:
-+            self._deal_with_bad_rpmdbcache("conflicts")
-             return None
+ 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. """
+@@ -1207,7 +1229,7 @@ class VersionCommand(YumCommand):
+                 lastdbv = base.history.last()
+                 if lastdbv is not None:
+                     lastdbv = lastdbv.end_rpmdbversion
+-                if lastdbv is None or data[0] != lastdbv:
++                if lastdbv is not None and data[0] != lastdbv:
+                     base._rpmdb_warn_checks(warn=lastdbv is not None)
+                 if vcmd not in ('group-installed', 'group-all'):
+                     cols.append(("%s %s/%s" % (_("Installed:"), rel, ba),
+@@ -1215,6 +1237,9 @@ class VersionCommand(YumCommand):
+                     _append_repos(cols, data[1])
+                 if groups:
+                     for grp in sorted(data[2]):
++                        if (vcmd.startswith("group-") and
++                            len(extcmds) > 1 and grp not in extcmds[1:]):
++                            continue
+                         cols.append(("%s %s" % (_("Group-Installed:"), grp),
+                                      str(data[2][grp])))
+                         _append_repos(cols, data[3][grp])
+@@ -1230,6 +1255,9 @@ class VersionCommand(YumCommand):
+                         _append_repos(cols, data[1])
+                 if groups:
+                     for grp in sorted(data[2]):
++                        if (vcmd.startswith("group-") and
++                            len(extcmds) > 1 and grp not in extcmds[1:]):
++                            continue
+                         cols.append(("%s %s" % (_("Group-Available:"), grp),
+                                      str(data[2][grp])))
+                         if verbose:
+@@ -1347,13 +1375,14 @@ class CheckRpmdbCommand(YumCommand):
+     def doCommand(self, base, basecmd, extcmds):
+         chkcmd = 'all'
+         if extcmds:
+-            chkcmd = extcmds[0]
++            chkcmd = extcmds
  
-         self._cached_conflicts_data = ret
-@@ -663,6 +685,7 @@ class RPMDBPackageSack(PackageSackBase):
-             if fo.readline() != '': # Should be EOF
-                 return None, None
-         except ValueError:
-+            self._deal_with_bad_rpmdbcache("file requires")
-             return None, None
+         def _out(x):
+             print x
  
-         return iFR, iFP
-@@ -800,11 +823,16 @@ class RPMDBPackageSack(PackageSackBase):
-             if fo.readline() != '': # Should be EOF
-                 return
-         except ValueError:
-+            self._deal_with_bad_rpmdbcache("pkg checksums")
-             return
+         rc = 0
+-        if base._rpmdb_warn_checks(_out, False, chkcmd):
++        if base._rpmdb_warn_checks(out=_out, warn=False, chkcmd=chkcmd,
++                                   header=lambda x: None):
+             rc = 1
+         return rc, ['%s %s' % (basecmd, chkcmd)]
  
-         for pkgtup in checksum_data:
-             (n, a, e, v, r) = pkgtup
--            pkg = self.searchNevra(n, e, v, r, a)[0]
-+            pkg = self.searchNevra(n, e, v, r, a)
-+            if not pkg:
-+                self._deal_with_bad_rpmdbcache("pkg checksums")
-+                continue
-+            pkg = pkg[0]
-             (T, D) = checksum_data[pkgtup]
-             if ('checksum_type' in pkg.yumdb_info._read_cached_data or
-                 'checksum_data' in pkg.yumdb_info._read_cached_data):
--- 
-1.7.0.1
-


Index: yum.spec
===================================================================
RCS file: /cvs/pkgs/rpms/yum/devel/yum.spec,v
retrieving revision 1.317
retrieving revision 1.318
diff -u -p -r1.317 -r1.318
--- yum.spec	13 May 2010 22:18:31 -0000	1.317
+++ yum.spec	26 May 2010 21:03:26 -0000	1.318
@@ -3,7 +3,7 @@
 Summary: RPM installer/updater
 Name: yum
 Version: 3.2.27
-Release: 12%{?dist}
+Release: 13%{?dist}
 License: GPLv2+
 Group: System Environment/Base
 Source0: http://yum.baseurl.org/download/3.2/%{name}-%{version}.tar.gz
@@ -132,6 +132,10 @@ rm -rf $RPM_BUILD_ROOT
 %dir /usr/lib/yum-plugins
 
 %changelog
+* Wed May 26 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.27-13
+- minor cleanups for yum-utils with --setopt
+- translation updates
+
 * Thu May 13 2010 James Antill <james at fedoraproject.org> - 3.2.27-12
 - Latest head.
 - History db version 2



More information about the scm-commits mailing list