rpms/yum/devel latest-head4rawhide.sh, 1.2, 1.3 yum-HEAD.patch, 1.63, 1.64

Seth Vidal skvidal at fedoraproject.org
Mon Jul 26 21:12:10 UTC 2010


Author: skvidal

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

Modified Files:
	latest-head4rawhide.sh yum-HEAD.patch 
Log Message:

- fix latest-head4rawhide.sh so it works for me
- newest head patch



Index: latest-head4rawhide.sh
===================================================================
RCS file: /cvs/pkgs/rpms/yum/devel/latest-head4rawhide.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- latest-head4rawhide.sh	16 Jun 2010 04:54:49 -0000	1.2
+++ latest-head4rawhide.sh	26 Jul 2010 21:12:09 -0000	1.3
@@ -8,9 +8,8 @@ if [ "x$1" = "xjames" ]; then
 fi
 if [ "x$1" = "xseth" ]; then
     done=true
-    cvs=~/work/fedora/cvs/yum/devel
-    git=~/work/rpm/private/yum
-    exit 1
+    cvs=~/proj/fedora/yum/devel
+    git=~/proj/yum/3.2.X
 fi
 if ! $done; then
 

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/cs.po                     | 1406 ++++++++++++---------
 b/po/en_GB.po                  | 2711 ++++++++++++++++++++++++++++++++++++++++-
 b/po/fi.po                     |  204 +--
 b/po/pt_BR.po                  | 1724 +++++++++++++++-----------
 b/po/ru.po                     |   13 
 b/po/sv.po                     | 1423 ++++++++++++---------
 b/po/uk.po                     | 2632 +++++++++++++++++++++++++++++++++++++++
 b/rpmUtils/arch.py             |   11 
 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/packagetests.py         |    2 
 b/test/simpleobsoletestests.py |   19 
 b/test/simpleupdatetests.py    |   41 
 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/Errors.py                |    4 
 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/metalink.py              |    6 
 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/plugins.py               |    3 
 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 
 b/yummain.py                   |   11 
 cli.py                         |  121 +
 docs/yum.8                     |   63 
 docs/yum.conf.5                |   86 +
 etc/Makefile                   |    1 
 etc/yum.bash                   |   18 
 output.py                      |  485 +++++--
 po/fi.po                       |    5 
 po/ru.po                       | 1574 ++++++++++++-----------
 po/sv.po                       |  157 --
 po/uk.po                       |  825 +++++++-----
 rpmUtils/arch.py               |   38 
 rpmUtils/miscutils.py          |   25 
 rpmUtils/transaction.py        |   10 
 rpmUtils/updates.py            |   45 
 test/simpleobsoletestests.py   |    6 
 test/simpleupdatetests.py      |    6 
 test/testbase.py               |   22 
 test/yum-leak-test.py          |   57 
 utils.py                       |  162 +-
 yum.spec                       |   28 
 yum/Errors.py                  |   17 
 yum/__init__.py                |  752 +++++++----
 yum/comps.py                   |    6 
 yum/config.py                  |  122 +
 yum/depsolve.py                |  219 ++-
 yum/history.py                 |  406 +++++-
 yum/logginglevels.py           |   65 
 yum/metalink.py                |    6 
 yum/misc.py                    |  178 ++
 yum/packageSack.py             |   46 
 yum/packages.py                |  619 ++++++---
 yum/pgpmsg.py                  |   17 
 yum/plugins.py                 |   29 
 yum/repoMDObject.py            |   11 
 yum/repos.py                   |    6 
 yum/rpmsack.py                 |  430 +++++-
 yum/sqlitesack.py              |  162 +-
 yum/transactioninfo.py         |   86 -
 yum/update_md.py               |   26 
 yum/yumRepo.py                 |   54 
 yumcommands.py                 |   30 
 95 files changed, 13166 insertions(+), 4689 deletions(-)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.63 -r 1.64 yum-HEAD.patchIndex: yum-HEAD.patch
===================================================================
RCS file: /cvs/pkgs/rpms/yum/devel/yum-HEAD.patch,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -p -r1.63 -r1.64
--- yum-HEAD.patch	16 Jul 2010 20:18:15 -0000	1.63
+++ yum-HEAD.patch	26 Jul 2010 21:12:09 -0000	1.64
@@ -21,7 +21,7 @@ index 6c23f88..3d82b55 100644
  def logLevelFromErrorLevel(error_level):
      """ Convert an old-style error logging level to the new style. """
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From 11dfde5e065e21c5bdb25a087501b90afe0b0dab Mon Sep 17 00:00:00 2001
@@ -66,7 +66,7 @@ index ea73549..0aaa819 100644
              totkeys = misc.unique(totkeys)
              totvals = misc.unique(totvals)
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From c6f4d336bd6be5cdb575c94628da2eb7bcb900f4 Mon Sep 17 00:00:00 2001
@@ -92,7 +92,7 @@ index ad8db7e..cb01306 100644
      
  class YumConf(StartupConf):
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From 40a53f0d3a8dd8ad4fb4802890e4f30b0214f3f9 Mon Sep 17 00:00:00 2001
@@ -702,7 +702,7 @@ index 4347eba..4240973 100644
  msgid "Could not set cachedir: %s"
  msgstr "Välimuistihakemiston asettaminen epäonnistui %s"
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From 2d8c8f210292766cc5389ac5700c3fa7fe1c8342 Mon Sep 17 00:00:00 2001
@@ -779,7 +779,7 @@ index 3d82b55..3a62945 100644
 +        syslogformatter = logging.Formatter(app + "[%(process)d]: %(message)s")
          syslog.setFormatter(syslogformatter)
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From a479fa2fca23ca0173cc06f7e4e24305df0db3cc Mon Sep 17 00:00:00 2001
@@ -830,7 +830,7 @@ index 3a62945..1ab11db 100644
  
      if debuglevel is not None:
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From b9484bfd83e3c0f83389a649a4cfd7b50b8c2b8e Mon Sep 17 00:00:00 2001
@@ -861,7 +861,7 @@ index cca3db7..a4789da 100644
  .IP
  \fBproxy \fR
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From 311221f71bba055a623565996e981156265789ef Mon Sep 17 00:00:00 2001
@@ -935,7 +935,7 @@ index cb01306..c82fabc 100644
      
  class YumConf(StartupConf):
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From 203a39125e1de20500739c94e7c92d074d19790f Mon Sep 17 00:00:00 2001
@@ -1066,7 +1066,7 @@ index 35bd97c..88c047f 100644
      """ Get the length of each pkg's column. Add that to data.
          This "knows" about simpleList and printVer. """
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From cb59d97fba6765d03a908219d5258b3896f2ecb1 Mon Sep 17 00:00:00 2001
@@ -1106,7 +1106,7 @@ 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.7.0.1
+1.7.1.1
 
 
 From a33aa64f23ac3c197871e9100c99e9cccc3f58b1 Mon Sep 17 00:00:00 2001
@@ -1140,7 +1140,7 @@ index 54d4cd7..fc051b0 100644
          oldpkgtup = pkgtup
          name = oldpkgtup[0]
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From 008d74a13173bcb7005e7150ebc1367720078452 Mon Sep 17 00:00:00 2001
@@ -1199,7 +1199,7 @@ index a34d205..cebbae3 100644
          
      def updatePkgs(self, userlist, quiet=0):
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From b3ca56aed8f2949b73d07bf3c1aa90ae20793848 Mon Sep 17 00:00:00 2001
@@ -1274,7 +1274,7 @@ index b09730a..aa5dc4d 100755
      
      def procConflict(self, name, confname):
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From f2c3967ea8185541a3c68fad754d19b2dfd71d35 Mon Sep 17 00:00:00 2001
@@ -1412,7 +1412,7 @@ index 2707cac..3ef5f74 100644
          sql += "(%s)" % ",".join(['?'] * len(pkgtupids))
          params = list(pkgtupids)
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From 7d04b0e6816cfb27e769bb19f44811f88523ed2b Mon Sep 17 00:00:00 2001
@@ -1438,7 +1438,7 @@ index 29870e5..3a724cd 100644
  %package updatesd
  Summary: Update notification daemon
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From 1c2b28e36ef1d7051428ea57446cf800b388f36e Mon Sep 17 00:00:00 2001
@@ -1479,7 +1479,7 @@ index aa5dc4d..c4fde7c 100755
                  rmark = '<'
              if old.altered_gt_rpmdb:
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From 5579a905155a6be3171f6968a24e691bafcac40b Mon Sep 17 00:00:00 2001
@@ -1505,7 +1505,7 @@ index c4fde7c..7b09695 100755
                               utf8_width_fill(uiacts, 16, 16), count)
  
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From 9c3b0e9ae6b86cd96ee8751fc9e131e063724b23 Mon Sep 17 00:00:00 2001
@@ -1604,7 +1604,7 @@ index 11c9f29..f654d84 100644
                      # See if the update solves the problem...
                      found = False
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From e0175dae0b4eb45f4c2b14f816f1145553ef0e1b Mon Sep 17 00:00:00 2001
@@ -1645,7 +1645,7 @@ index 5dfdb64..c71344e 100644
              return 0
              ;;
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From 1f800dfd4b8c7adb96c653ebd41f7d6b3869d569 Mon Sep 17 00:00:00 2001
@@ -1702,7 +1702,7 @@ index a1b946e..7c5137d 100644
  #: ../output.py:1599
  msgid "--> Running transaction check"
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From 305cb4c7c937dd2ea59180c4f08c0635c614e9c9 Mon Sep 17 00:00:00 2001
@@ -1738,7 +1738,7 @@ index 7c5137d..44c4591 100644
  #: ../output.py:1599
  msgid "--> Running transaction check"
 -- 
-1.7.0.1
+1.7.1.1
 
 
 From 32fa4bdafb9c820af8f6bbbbc75cea976725e247 Mon Sep 17 00:00:00 2001
@@ -1876,7 +1876,7 @@ index 7b84a61..88d4467 100644
                  continue
                      
[...2345 lines suppressed...]
++                                'command_line'])
++
+     def __init__(self, conf, pkgdir, yumdb_cache=None):
+         self._conf = conf
+         self._mydir = pkgdir
+-        # FIXME needs some intelligent caching beyond the FS cache
++
+         self._read_cached_data = {}
+ 
+         #  'from_repo' is the most often requested piece of data, and is often
+@@ -1497,6 +1505,75 @@ class RPMDBAdditionalDataPackage(object):
+         # so we make it generic.
+         self._yumdb_cache = yumdb_cache
+ 
++    def _auto_cache(self, attr, value, fn, info=None):
++        """ Create caches for the attr. We have a per. object read cache so at
++            worst we only have to read a single attr once. Then we expand that
++            with (dev, ino) cache, so hardlink data can be read once for
++            multiple packages. """
++        self._read_cached_data[attr] = value
++        if self._yumdb_cache is None:
++            return
++
++        nlinks = 1
++        if info is not None:
++            nlinks = info.st_nlink
++        if nlinks <= 1 and attr not in self._auto_hardlink_attrs:
++            return
++
++        if value in self._yumdb_cache['attr']:
++            sinfo = self._yumdb_cache['attr'][value][1]
++            if info is not None and sinfo is not None:
++                if (info.st_dev, info.st_ino) == (sinfo.st_dev, sinfo.st_ino):
++                    self._yumdb_cache['attr'][value][2].add(fn)
++                    self._yumdb_cache[fn] = value
++                    return
++            if self._yumdb_cache['attr'][value][0] >= nlinks:
++                # We already have a better cache file.
++                return
++
++        self._yumdb_cache['attr'][value] = (nlinks, info, set([fn]))
++        self._yumdb_cache[fn]            = value
++
++    def _unlink_yumdb_cache(self, fn):
++        """ Remove old values from the link cache. """
++        if fn in self._yumdb_cache:
++            ovalue = self._yumdb_cache[fn]
++            if ovalue in self._yumdb_cache['attr']:
++                self._yumdb_cache['attr'][ovalue][2].discard(fn)
++                if not self._yumdb_cache['attr'][ovalue][2]:
++                    del self._yumdb_cache['attr'][ovalue]
++            del self._yumdb_cache[fn]
++
++    def _link_yumdb_cache(self, fn, value):
++        """ If we have a matching yumdb cache, link() to it instead of having
++            to open()+write(). """
++        if self._yumdb_cache is None:
++            return False
++
++        self._unlink_yumdb_cache(fn)
++
++        if value not in self._yumdb_cache['attr']:
++            return False
++
++        assert self._yumdb_cache['attr'][value][2]
++        try:
++            lfn = iter(self._yumdb_cache['attr'][value][2]).next()
++            misc.unlink_f(fn + '.tmp')
++            os.link(lfn, fn + '.tmp')
++            os.rename(fn + '.tmp', fn)
++        except:
++            return False
++
++        self._yumdb_cache['attr'][value][2].add(fn)
++        self._yumdb_cache[fn] = value
++        self._read_cached_data['attr'] = value
++
++        return True
++
++    def _attr2fn(self, attr):
++        """ Given an attribute, return the filename. """
++        return os.path.normpath(self._mydir + '/' + attr)
++
+     def _write(self, attr, value):
+         # check for self._conf.writable before going on?
+         if not os.path.exists(self._mydir):
+@@ -1505,8 +1582,17 @@ class RPMDBAdditionalDataPackage(object):
+         attr = _sanitize(attr)
+         if attr in self._read_cached_data:
+             del self._read_cached_data[attr]
+-        fn = self._mydir + '/' + attr
+-        fn = os.path.normpath(fn)
++        fn = self._attr2fn(attr)
++
++        if attr.endswith('.tmp'):
++            raise AttributeError, "Cannot set attribute %s on %s" % (attr, self)
++
++        # Auto hardlink some of the attrs...
++        if self._link_yumdb_cache(fn, value):
++            return
++
++        # Default write()+rename()... hardlink -c can still help.
++        misc.unlink_f(fn + '.tmp')
+         fo = open(fn + '.tmp', 'w')
+         try:
+             fo.write(value)
+@@ -1517,18 +1603,19 @@ class RPMDBAdditionalDataPackage(object):
+         fo.close()
+         del fo
+         os.rename(fn +  '.tmp', fn) # even works on ext4 now!:o
+-        self._read_cached_data[attr] = value
++
++        self._auto_cache(attr, value, fn)
+     
+     def _read(self, attr):
+         attr = _sanitize(attr)
+ 
+-        if attr.endswith('.tmp'):
+-            raise AttributeError, "%s has no attribute %s" % (self, attr)
+-
+         if attr in self._read_cached_data:
+             return self._read_cached_data[attr]
++        fn = self._attr2fn(attr)
++
++        if attr.endswith('.tmp'):
++            raise AttributeError, "%s has no attribute %s" % (self, attr)
+ 
+-        fn = self._mydir + '/' + attr
+         info = misc.stat_f(fn)
+         if info is None:
+             raise AttributeError, "%s has no attribute %s" % (self, attr)
+@@ -1536,26 +1623,28 @@ class RPMDBAdditionalDataPackage(object):
+         if info.st_nlink > 1 and self._yumdb_cache is not None:
+             key = (info.st_dev, info.st_ino)
+             if key in self._yumdb_cache:
+-                self._read_cached_data[attr] = self._yumdb_cache[key]
++                self._auto_cache(attr, self._yumdb_cache[key], fn, info)
+                 return self._read_cached_data[attr]
+ 
+         fo = open(fn, 'r')
+-        self._read_cached_data[attr] = fo.read()
++        value = fo.read()
+         fo.close()
+         del fo
+ 
+         if info.st_nlink > 1 and self._yumdb_cache is not None:
+-            self._yumdb_cache[key] = self._read_cached_data[attr]
++            self._yumdb_cache[key] = value
++        self._auto_cache(attr, value, fn, info)
+ 
+-        return self._read_cached_data[attr]
++        return value
+     
+     def _delete(self, attr):
+         """remove the attribute file"""
+ 
+         attr = _sanitize(attr)
+-        fn = self._mydir + '/' + attr
++        fn = self._attr2fn(attr)
+         if attr in self._read_cached_data:
+             del self._read_cached_data[attr]
++        self._unlink_yumdb_cache(fn)
+         if os.path.exists(fn):
+             try:
+                 os.unlink(fn)
+-- 
+1.7.1.1
+
+
+From c9ff70d44015a756f9bdb158a9d81f9e234dd6ef Mon Sep 17 00:00:00 2001
+From: James Antill <james at and.org>
+Date: Fri, 23 Jul 2010 16:21:42 -0400
+Subject: [PATCH 251] Unnecessarily load yumdb data from old packages, for hardlinks (minor hack)
+
+---
+ yum/transactioninfo.py |    8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/yum/transactioninfo.py b/yum/transactioninfo.py
+index 2e0ccde..31d3569 100644
+--- a/yum/transactioninfo.py
++++ b/yum/transactioninfo.py
+@@ -740,6 +740,14 @@ class TransactionMember:
+             val = getattr(self.po, attr)
+             setattr(self, attr, val)
+ 
++        if po.repoid == 'installed':
++            #  We want to load these so that we can auto hardlink in the same
++            # new values. Because of the hardlinks it should be really cheap
++            # to load them ... although it's still a minor hack.
++            po.yumdb_info.get('from_repo')
++            po.yumdb_info.get('releasever')
++            po.yumdb_info.get('changed_by')
++
+     def setAsDep(self, po=None):
+         """sets the transaction member as a dependency and maps the dep into the
+            relationship list attribute"""
+-- 
+1.7.1.1
 



More information about the scm-commits mailing list