rpms/yum/devel yum-HEAD.patch,1.52,1.53 yum.spec,1.312,1.313

James Antill james at fedoraproject.org
Thu Apr 29 22:06:34 UTC 2010


Author: james

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

Modified Files:
	yum-HEAD.patch yum.spec 
Log Message:
* Thu Apr 29 2010 James Antill <james at fedoraproject.org> - 3.2.27-9
- Latest yum-3_2_X head.
- Added protect packages.
- Bug fixes from the yum bug day.
- Added removed size output.
- Added glob: to all list config. options.
- Fix fsvars.


yum-HEAD.patch:
 Makefile                  |    2 
 b/Makefile                |    2 
 b/cli.py                  |   63 +
 b/docs/yum.8              |   10 
 b/docs/yum.conf.5         |    5 
 b/etc/Makefile            |    1 
 b/etc/yum.bash            |    7 
 b/output.py               |   39 -
 b/po/fi.po                |  204 ++---
 b/po/pt_BR.po             | 1724 ++++++++++++++++++++++++++--------------------
 b/po/ru.po                |   13 
 b/rpmUtils/miscutils.py   |   45 -
 b/rpmUtils/oldUtils.py    |    2 
 b/rpmUtils/transaction.py |    7 
 b/rpmUtils/updates.py     |   13 
 b/test/depsolvetests.py   |   16 
 b/test/testbase.py        |    2 
 b/test/yum-leak-test.py   |   55 +
 b/test/yum-pylintrc       |    3 
 b/utils.py                |    3 
 b/yum-updatesd.py         |    8 
 b/yum.spec                |    3 
 b/yum/__init__.py         |   11 
 b/yum/comps.py            |   21 
 b/yum/config.py           |    3 
 b/yum/depsolve.py         |   12 
 b/yum/history.py          |   35 
 b/yum/logginglevels.py    |    3 
 b/yum/mdparser.py         |    2 
 b/yum/misc.py             |    9 
 b/yum/packageSack.py      |   32 
 b/yum/packages.py         |   16 
 b/yum/pgpmsg.py           |    3 
 b/yum/pkgtag_db.py        |    4 
 b/yum/repoMDObject.py     |   93 ++
 b/yum/repos.py            |    2 
 b/yum/rpmsack.py          |   17 
 b/yum/sqlitesack.py       |   27 
 b/yum/transactioninfo.py  |   11 
 b/yum/update_md.py        |    5 
 b/yum/yumRepo.py          |    9 
 b/yumcommands.py          |   23 
 cli.py                    |   84 +-
 docs/yum.8                |   41 +
 docs/yum.conf.5           |   62 +
 etc/Makefile              |    1 
 etc/yum.bash              |   15 
 output.py                 |   32 
 po/ru.po                  | 1303 +++++++++++++++++-----------------
 rpmUtils/updates.py       |   40 -
 test/testbase.py          |   15 
 test/yum-leak-test.py     |   57 +
 utils.py                  |    5 
 yum.spec                  |   17 
 yum/__init__.py           |  238 ++++--
 yum/config.py             |  106 +-
 yum/depsolve.py           |   99 ++
 yum/history.py            |    2 
 yum/logginglevels.py      |   51 -
 yum/misc.py               |   26 
 yum/packageSack.py        |   46 -
 yum/packages.py           |  128 ++-
 yum/pgpmsg.py             |   17 
 yum/repoMDObject.py       |    5 
 yum/rpmsack.py            |  129 ++-
 yum/sqlitesack.py         |   86 +-
 yum/transactioninfo.py    |   47 -
 yum/update_md.py          |    7 
 yum/yumRepo.py            |   21 
 yumcommands.py            |   13 
 70 files changed, 3286 insertions(+), 1972 deletions(-)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.52 -r 1.53 yum-HEAD.patchIndex: yum-HEAD.patch
===================================================================
RCS file: /cvs/pkgs/rpms/yum/devel/yum-HEAD.patch,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -p -r1.52 -r1.53
--- yum-HEAD.patch	22 Apr 2010 16:59:55 -0000	1.52
+++ yum-HEAD.patch	29 Apr 2010 22:06:30 -0000	1.53
@@ -1,7 +1,7 @@
 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/72] Fix unknown syslog facility mapping.
+Subject: [PATCH 01/89] Fix unknown syslog facility mapping.
 
 ---
  yum/logginglevels.py |    2 +-
@@ -21,13 +21,13 @@ index 6c23f88..3d82b55 100644
  def logLevelFromErrorLevel(error_level):
      """ Convert an old-style error logging level to the new style. """
 -- 
-1.6.6.1
+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 02/72] make sure we aren't overwriting the value of 'keys'
+Subject: [PATCH 02/89] 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
@@ -66,13 +66,13 @@ index ea73549..0aaa819 100644
              totkeys = misc.unique(totkeys)
              totvals = misc.unique(totvals)
 -- 
-1.6.6.1
+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 03/72] Use LOG_USER as default syslog facility everywhere in base.
+Subject: [PATCH 03/89] Use LOG_USER as default syslog facility everywhere in base.
 
 ---
  yum/config.py |    2 +-
@@ -92,13 +92,13 @@ index ad8db7e..cb01306 100644
      
  class YumConf(StartupConf):
 -- 
-1.6.6.1
+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 04/72] l10n: Updates to Finnish (fi) translation
+Subject: [PATCH 04/89] l10n: Updates to Finnish (fi) translation
 
 Transmitted-via: Transifex (www.transifex.net)
 ---
@@ -702,13 +702,13 @@ index 4347eba..4240973 100644
  msgid "Could not set cachedir: %s"
  msgstr "Välimuistihakemiston asettaminen epäonnistui %s"
 -- 
-1.6.6.1
+1.7.0.1
 
 
 From 2d8c8f210292766cc5389ac5700c3fa7fe1c8342 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta at iki.fi>
 Date: Wed, 24 Mar 2010 18:25:35 +0200
-Subject: [PATCH 05/72] Fix syslog_indent and syslog_facility settings, improve syslog format.
+Subject: [PATCH 05/89] Fix syslog_indent and syslog_facility settings, improve syslog format.
 
 ---
  yum/logginglevels.py |   22 +++++++++-------------
@@ -779,13 +779,13 @@ index 3d82b55..3a62945 100644
 +        syslogformatter = logging.Formatter(app + "[%(process)d]: %(message)s")
          syslog.setFormatter(syslogformatter)
 -- 
-1.6.6.1
+1.7.0.1
 
 
 From a479fa2fca23ca0173cc06f7e4e24305df0db3cc Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta at iki.fi>
 Date: Wed, 24 Mar 2010 19:19:30 +0200
-Subject: [PATCH 06/72] Add support for remote syslogs with host:port values for syslog_device.
+Subject: [PATCH 06/89] Add support for remote syslogs with host:port values for syslog_device.
 
 ---
  yum/logginglevels.py |   27 +++++++++++++++++----------
@@ -830,13 +830,13 @@ index 3a62945..1ab11db 100644
  
      if debuglevel is not None:
 -- 
-1.6.6.1
+1.7.0.1
 
 
 From b9484bfd83e3c0f83389a649a4cfd7b50b8c2b8e Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta at iki.fi>
 Date: Wed, 24 Mar 2010 22:04:35 +0200
-Subject: [PATCH 07/72] Document syslog_ident and syslog_facility config parameters.
+Subject: [PATCH 07/89] Document syslog_ident and syslog_facility config parameters.
 
 ---
  docs/yum.conf.5 |    4 ++--
@@ -861,13 +861,13 @@ index cca3db7..a4789da 100644
  .IP
  \fBproxy \fR
 -- 
-1.6.6.1
+1.7.0.1
 
 
 From 311221f71bba055a623565996e981156265789ef Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta at iki.fi>
 Date: Wed, 24 Mar 2010 23:31:28 +0200
-Subject: [PATCH 08/72] Make syslog_device configurable.
+Subject: [PATCH 08/89] Make syslog_device configurable.
 
 ---
  docs/yum.conf.5 |    6 ++++++
@@ -935,13 +935,13 @@ index cb01306..c82fabc 100644
      
  class YumConf(StartupConf):
 -- 
-1.6.6.1
+1.7.0.1
 
 
 From 203a39125e1de20500739c94e7c92d074d19790f Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Thu, 4 Mar 2010 17:17:30 -0500
-Subject: [PATCH 09/72]  Add distro-sync command, to "force update" to the latest versions.
+Subject: [PATCH 09/89]  Add distro-sync command, to "force update" to the latest versions.
 
  This should be safe to go in for 3.2.27, as it's an entirely self
 contained command ... I've tried it here going on multiple directions,
@@ -1066,13 +1066,13 @@ index 35bd97c..88c047f 100644
      """ Get the length of each pkg's column. Add that to data.
          This "knows" about simpleList and printVer. """
 -- 
-1.6.6.1
+1.7.0.1
 
 
 From cb59d97fba6765d03a908219d5258b3896f2ecb1 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Thu, 11 Mar 2010 11:54:41 -0500
-Subject: [PATCH 10/72] Add documentation for distro-sync command.
+Subject: [PATCH 10/89] Add documentation for distro-sync command.
 
 ---
  docs/yum.8 |    9 +++++++++
@@ -1106,13 +1106,13 @@ index 8d42d9d..ff7ed8f 100644
  Are used to remove the specified packages from the system
  as well as removing any packages which depend on the package being
 -- 
-1.6.6.1
+1.7.0.1
 
 
 From a33aa64f23ac3c197871e9100c99e9cccc3f58b1 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Thu, 11 Mar 2010 11:47:33 -0500
-Subject: [PATCH 11/72] Add a little more documentation to get_applicable_notices()
+Subject: [PATCH 11/89] Add a little more documentation to get_applicable_notices()
 
 ---
  yum/update_md.py |    4 +++-
@@ -1140,13 +1140,13 @@ index 54d4cd7..fc051b0 100644
          oldpkgtup = pkgtup
          name = oldpkgtup[0]
 -- 
-1.6.6.1
+1.7.0.1
 
 
 From 008d74a13173bcb7005e7150ebc1367720078452 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Thu, 11 Mar 2010 14:47:40 -0500
-Subject: [PATCH 12/72]  Return an error code if yum can't install any of the specified packages
+Subject: [PATCH 12/89]  Return an error code if yum can't install any of the specified packages
 
  People want a bash scriptable way to say "X should be installed". So
 with this patch:
@@ -1199,13 +1199,13 @@ index a34d205..cebbae3 100644
          
      def updatePkgs(self, userlist, quiet=0):
 -- 
-1.6.6.1
+1.7.0.1
 
[...7213 lines suppressed...]
+1.7.0.1
+
+
+From c5648243705d1fcc96274eaed554a9895d52fa47 Mon Sep 17 00:00:00 2001
+From: James Antill <james at and.org>
+Date: Thu, 29 Apr 2010 12:14:32 -0400
+Subject: [PATCH 87/89] Add the new, 4.8.0, error class for "cannot open DB", BZ 567709
+
+---
+ yum/config.py |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/yum/config.py b/yum/config.py
+index 1b78fcd..3610b91 100644
+--- a/yum/config.py
++++ b/yum/config.py
+@@ -1000,6 +1000,9 @@ def _getsysver(installroot, distroverpkg):
+             else:
+                 raise Errors.YumBaseError("Error: " + str(e))
+         raise Errors.YumBaseError("Error: " + str(e))
++    except rpm.error, e:
++        # This is the "new" code for "cannot open rpmdb", 4.8.0 ish
++        raise Errors.YumBaseError("Error: " + str(e))
+     # we're going to take the first one - if there is more than one of these
+     # then the user needs a beating
+     if idx.count() == 0:
+-- 
+1.7.0.1
+
+
+From aa29fc5a8c80eb23023b7f09a92793fe3fcf0bd3 Mon Sep 17 00:00:00 2001
+From: James Antill <james at and.org>
+Date: Thu, 29 Apr 2010 11:55:48 -0400
+Subject: [PATCH 88/89] Add total removal size, when just doing removes. BZ 495595
+
+---
+ cli.py    |   10 +++++++++-
+ output.py |   20 ++++++++++++++++++++
+ 2 files changed, 29 insertions(+), 1 deletions(-)
+
+diff --git a/cli.py b/cli.py
+index 2977ca8..fc91de2 100644
+--- a/cli.py
++++ b/cli.py
+@@ -416,12 +416,18 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+         
+         # Check which packages have to be downloaded
+         downloadpkgs = []
++        rmpkgs = []
+         stuff_to_download = False
+         install_only = True
++        remove_only  = True
+         for txmbr in self.tsInfo.getMembers():
+             if txmbr.ts_state not in ('i', 'u'):
+                 install_only = False
++                po = txmbr.po
++                if po:
++                    rmpkgs.append(po)
+             else:
++                remove_only = False
+                 stuff_to_download = True
+                 po = txmbr.po
+                 if po:
+@@ -434,7 +440,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+ 
+         # Report the total download size to the user, so he/she can base
+         # the answer on this info
+-        if stuff_to_download:
++        if not stuff_to_download:
++            self.reportRemoveSize(rmpkgs)
++        else:
+             self.reportDownloadSize(downloadpkgs, install_only)
+         
+         # confirm with user
+diff --git a/output.py b/output.py
+index 452f8a2..95564e1 100755
+--- a/output.py
++++ b/output.py
+@@ -927,6 +927,26 @@ class YumOutput:
+                 self.verbose_logger.log(logginglevels.INFO_1,
+                                         _("Installed size: %s"),
+                                         self.format_number(insize))
++
++    def reportRemoveSize(self, packages):
++        """Report the total size of packages being removed. """
++        totsize = 0
++        error = False
++        for pkg in packages:
++            # Just to be on the safe side, if for some reason getting
++            # the package size fails, log the error and don't report download
++            # size
++            try:
++                size = int(pkg.size)
++                totsize += size
++            except:
++                error = True
++                self.logger.error(_('There was an error calculating installed size'))
++                break
++        if (not error):
++            self.verbose_logger.log(logginglevels.INFO_1,
++                                    _("Installed size: %s"),
++                                    self.format_number(totsize))
+             
+     def listTransaction(self):
+         """returns a string rep of the  transaction in an easy-to-read way."""
+-- 
+1.7.0.1
+
+
+From 8af3344f865f6af9a2d9293c513f7c936066eb58 Mon Sep 17 00:00:00 2001
+From: James Antill <james at and.org>
+Date: Thu, 29 Apr 2010 14:43:24 -0400
+Subject: [PATCH 89/89] Ignore problems about packages being removed, BZ 566820
+
+---
+ yum/__init__.py |   42 ++++++++++++++++++++++++++++++++++++------
+ 1 files changed, 36 insertions(+), 6 deletions(-)
+
+diff --git a/yum/__init__.py b/yum/__init__.py
+index 99b0bc1..0a39365 100644
+--- a/yum/__init__.py
++++ b/yum/__init__.py
+@@ -1178,7 +1178,8 @@ class YumBase(depsolve.Depsolve):
+             toRemove.add(dep)
+             self._getDepsToRemove(dep, deptree, toRemove)
+ 
+-    def _rpmdb_warn_checks(self, out=None, warn=True, chkcmd=None, header=None):
++    def _rpmdb_warn_checks(self, out=None, warn=True, chkcmd=None, header=None,
++                           ignore_pkgs=[]):
+         if out is None:
+             out = self.logger.warning
+         if chkcmd is None:
+@@ -1196,22 +1197,48 @@ class YumBase(depsolve.Depsolve):
+         else:
+             chkcmd = set([chkcmd])
+ 
++        ignore_pkgtups = set((pkg.pkgtup for pkg in ignore_pkgs))
++
+         rc = 0
+         probs = []
+         if chkcmd.intersection(set(('all', 'dependencies'))):
+             prob2ui = {'requires' : _('missing requires'),
+                        'conflicts' : _('installed conflict')}
+-            probs.extend(self.rpmdb.check_dependencies())
++            for prob in self.rpmdb.check_dependencies():
++                if prob.pkg.pkgtup in ignore_pkgtups:
++                    continue
++                if prob.problem == 'conflicts':
++                    found = True # all the conflicting pkgs have to be ignored
++                    for res in prob.res:
++                        if res.pkgtup not in ignore_pkgtups:
++                            found = False
++                            break
++                    if found:
++                        continue
++                probs.append(prob)
+ 
+         if chkcmd.intersection(set(('all', 'duplicates'))):
+             iopkgs = set(self.conf.installonlypkgs)
+-            probs.extend(self.rpmdb.check_duplicates(iopkgs))
++            for prob in self.rpmdb.check_duplicates(iopkgs):
++                if prob.pkg.pkgtup in ignore_pkgtups:
++                    continue
++                if prob.duplicate.pkgtup in ignore_pkgtups:
++                    continue
++                probs.append(prob)
+ 
+         if chkcmd.intersection(set(('all', 'obsoleted'))):
+-            probs.extend(self.rpmdb.check_obsoleted())
++            for prob in self.rpmdb.check_obsoleted():
++                if prob.pkg.pkgtup in ignore_pkgtups:
++                    continue
++                probs.append(prob)
+ 
+         if chkcmd.intersection(set(('all', 'provides'))):
+-            probs.extend(self.rpmdb.check_provides())
++            for prob in self.rpmdb.check_provides():
++                if prob.pkg.pkgtup in ignore_pkgtups:
++                    continue
++                if prob.obsoleter.pkgtup in ignore_pkgtups:
++                    continue
++                probs.append(prob)
+ 
+         header(len(probs))
+         for prob in sorted(probs):
+@@ -1238,7 +1265,10 @@ class YumBase(depsolve.Depsolve):
+         if lastdbv is not None:
+             lastdbv = lastdbv.end_rpmdbversion
+         if lastdbv is None or rpmdbv != lastdbv:
+-            self._rpmdb_warn_checks(warn=lastdbv is not None)
++            txmbrs = self.tsInfo.getMembersWithState(None, TS_REMOVE_STATES)
++            ignore_pkgs = [txmbr.po for txmbr in txmbrs]
++            self._rpmdb_warn_checks(warn=lastdbv is not None,
++                                    ignore_pkgs=ignore_pkgs)
+         if self.conf.history_record:
+             self.history.beg(rpmdbv, using_pkgs, list(self.tsInfo))
+ 
+-- 
+1.7.0.1
 


Index: yum.spec
===================================================================
RCS file: /cvs/pkgs/rpms/yum/devel/yum.spec,v
retrieving revision 1.312
retrieving revision 1.313
diff -u -p -r1.312 -r1.313
--- yum.spec	23 Apr 2010 18:56:05 -0000	1.312
+++ yum.spec	29 Apr 2010 22:06:33 -0000	1.313
@@ -3,7 +3,7 @@
 Summary: RPM installer/updater
 Name: yum
 Version: 3.2.27
-Release: 8%{?dist}
+Release: 9%{?dist}
 License: GPLv2+
 Group: System Environment/Base
 Source0: http://yum.baseurl.org/download/3.2/%{name}-%{version}.tar.gz
@@ -31,8 +31,15 @@ Requires: yum-metadata-parser >= 1.1.0
 Requires: pygpgme
 Obsoletes: yum-skip-broken <= 1.1.18
 Obsoletes: yum-basearchonly <= 1.1.9
+Obsoletes: yum-allow-downgrade < 1.1.20-0
+Obsoletes: yum-plugin-allow-downgrade < 1.1.22-0
+Obsoletes: yum-plugin-protect-packages < 1.1.27-0
 Provides: yum-skip-broken
 Provides: yum-basearchonly
+Provides: yum-allow-downgrade
+Provides: yum-plugin-allow-downgrade
+Provides: yum-protect-packages
+Provides: yum-plugin-protect-packages
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %description
@@ -102,7 +109,9 @@ rm -rf $RPM_BUILD_ROOT
 %config(noreplace) %{_sysconfdir}/yum.conf
 %dir %{_sysconfdir}/yum
 %config(noreplace) %{_sysconfdir}/yum/version-groups.conf
-%dir %{_sysconfdir}/yum.repos.d
+%dir %{_sysconfdir}/yum/protected.d
+%dir %{_sysconfdir}/yum/repos.d
+%dir %{_sysconfdir}/yum/vars
 %config(noreplace) %{_sysconfdir}/logrotate.d/yum
 %{_sysconfdir}/bash_completion.d
 %dir %{_datadir}/yum-cli
@@ -123,6 +132,14 @@ rm -rf $RPM_BUILD_ROOT
 %dir /usr/lib/yum-plugins
 
 %changelog
+* Thu Apr 29 2010 James Antill <james at fedoraproject.org> - 3.2.27-9
+- Latest yum-3_2_X head.
+- Added protect packages.
+- Bug fixes from the yum bug day.
+- Added removed size output.
+- Added glob: to all list config. options.
+- Fix fsvars.
+
 * Thu Apr 22 2010 James Antill <james at fedoraproject.org> - 3.2.27-8
 - Latest yum-3_2_X head.
 - Add deselections.



More information about the scm-commits mailing list