Hello community,

here is the log from the commit of package yum for openSUSE:Factory checked in 
at 2014-03-15 17:35:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yum (Old)
 and      /work/SRC/openSUSE:Factory/.yum.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yum"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yum/yum.changes  2014-02-28 16:22:10.000000000 
+0100
+++ /work/SRC/openSUSE:Factory/.yum.new/yum.changes     2014-03-15 
17:35:53.000000000 +0100
@@ -1,0 +2,5 @@
+Thu Mar 13 12:14:46 CET 2014 - m...@suse.de
+
+- simplify suse-missing-tags patch
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yum-3.4.3-suse-missing-tags.patch ++++++
--- /var/tmp/diff_new_pack.OJVVjn/_old  2014-03-15 17:35:54.000000000 +0100
+++ /var/tmp/diff_new_pack.OJVVjn/_new  2014-03-15 17:35:54.000000000 +0100
@@ -1,5 +1,5 @@
---- ./yum/mdparser.py.orig     2014-02-25 11:04:36.905061790 +0000
-+++ ./yum/mdparser.py  2014-02-25 11:04:45.009061775 +0000
+--- ./yum/mdparser.py.orig     2014-03-13 11:04:20.753615026 +0000
++++ ./yum/mdparser.py  2014-03-13 11:04:51.698614971 +0000
 @@ -155,7 +155,8 @@ class PrimaryEntry(BaseEntry):
                  p[name] = child.text
  
@@ -10,24 +10,9 @@
                  self.prco[name] = self.getPrco(child)
  
              elif name == 'header-range':
---- ./yum/packages.py.orig     2014-02-25 11:04:36.910061790 +0000
-+++ ./yum/packages.py  2014-02-25 12:31:03.379052610 +0000
-@@ -54,6 +54,14 @@ except ImportError:
- import pwd
- import grp
- 
-+# check if rpm has the new weakdeps tags
-+_new_weakdeps = False
-+try:
-+    if rpm.RPMTAG_ENHANCENAME:
-+        _new_weakdeps = True
-+except:
-+    pass
-+
- def comparePoEVR(po1, po2):
-     """
-     Compare two Package or PackageEVR objects.
-@@ -412,6 +420,10 @@ class RpmBase(object):
+--- ./yum/packages.py.orig     2014-03-13 11:04:20.758615026 +0000
++++ ./yum/packages.py  2014-03-13 11:08:42.633614562 +0000
+@@ -412,6 +412,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))
@@ -38,7 +23,7 @@
          self.files = {}
          self.files['file'] = []
          self.files['dir'] = []
-@@ -615,6 +627,10 @@ class RpmBase(object):
+@@ -615,6 +619,10 @@ class RpmBase(object):
      provides = property(fget=lambda self: self.returnPrco('provides'))
      obsoletes = property(fget=lambda self: self.returnPrco('obsoletes'))
      conflicts = property(fget=lambda self: self.returnPrco('conflicts'))
@@ -49,7 +34,7 @@
      provides_names = property(fget=lambda self: 
self.returnPrcoNames('provides'))
      requires_names = property(fget=lambda self: 
self.returnPrcoNames('requires'))
      conflicts_names = property(fget=lambda self: 
self.returnPrcoNames('conflicts'))
-@@ -1122,6 +1138,10 @@ class YumAvailablePackage(PackageObject,
+@@ -1122,6 +1130,10 @@ class YumAvailablePackage(PackageObject,
          msg += self._dump_requires()
          msg += self._dump_pco('conflicts')         
          msg += self._dump_pco('obsoletes')         
@@ -60,60 +45,66 @@
          msg += self._dump_files(True)
          if msg[-1] != '\n':
              msg += """\n"""
-@@ -1358,6 +1378,17 @@ class YumHeaderPackage(YumAvailablePacka
+@@ -1358,13 +1370,35 @@ class YumHeaderPackage(YumAvailablePacka
      def _get_hdr(self):
          return self.hdr
  
-+    def _filter_deps(self, name, flag, vers, andmask, resmask):
-+        newname = []
-+        newflag = []
-+        newvers = []
-+        for (n, f, v) in zip(name, flag, vers):
-+            if f & andmask == resmask:
-+                newname.append(n)
-+                newflag.append(f)
-+                newvers.append(v)
-+        return (newname, newflag, newvers)
++    def _populatePrcoFiltered(self, ds, prcotype, andmask, resmask):
++        name = [] 
++        flag = [] 
++        vers = [] 
++        for dsel in ds:
++           if ds.Flags() & andmask == resmask:
++               name.append(ds.N())
++               flag.append(ds.Flags())
++               vers.append(ds.EVR())
++        if name:
++            name = map(misc.share_data, name)
++            flag = map(rpmUtils.miscutils.flagToString, flag)
++            flag = map(misc.share_data, flag)
++            vers = map(rpmUtils.miscutils.stringToVersion, vers)
++            vers = map(lambda x: (misc.share_data(x[0]), 
misc.share_data(x[1]),
++                                  misc.share_data(x[2])), vers)
++            self.prco[prcotype] = map(misc.share_data, zip(name,flag,vers))
 +
      def _populatePrco(self):
          "Populate the package object with the needed PRCO interface."
  
-@@ -1383,6 +1414,33 @@ class YumHeaderPackage(YumAvailablePacka
+-        tag2prco = { "OBSOLETE": misc.share_data("obsoletes"),
+-                     "CONFLICT": misc.share_data("conflicts"),
+-                     "REQUIRE":  misc.share_data("requires"),
+-                     "PROVIDE":  misc.share_data("provides") }
++        tag2prco = { "OBSOLETE":   misc.share_data("obsoletes"),
++                     "CONFLICT":   misc.share_data("conflicts"),
++                     "REQUIRE":    misc.share_data("requires"),
++                     "PROVIDE":    misc.share_data("provides"),
++                     "SUGGEST":    misc.share_data("suggests"),
++                     "ENHANCE":    misc.share_data("enhances"),
++                     "RECOMMEND":  misc.share_data("recommends"),
++                     "SUPPLEMENT": misc.share_data("supplements") }
+         hdr = self._get_hdr()
+         for tag in tag2prco:
+             name = hdr[getattr(rpm, 'RPMTAG_%sNAME' % tag)]
+@@ -1383,6 +1417,17 @@ class YumHeaderPackage(YumAvailablePacka
  
              prcotype = tag2prco[tag]
              self.prco[prcotype] = map(misc.share_data, zip(name,flag,vers))
 +
-+        tag2prco = { "SUGGEST":    ( misc.share_data("suggests"),    1156, 
1157, 1158, 1 << 27, 0),
-+                     "ENHANCE":    ( misc.share_data("enhances"),    1159, 
1160, 1161, 1 << 27, 0),
-+                     "RECOMMEND":  ( misc.share_data("recommends"),  1156, 
1157, 1158, 1 << 27, 1 << 27),
-+                     "SUPPLEMENT": ( misc.share_data("supplements"), 1159, 
1160, 1161, 1 << 27, 1 << 27) }
-+        for tag in tag2prco:
-+            (prcotype, oldtagn, oldtagv, oldtagf, andmask, resmask) = 
tag2prco[tag]
-+            name = None
-+            if _new_weakdeps:
-+                name = hdr[getattr(rpm, 'RPMTAG_%sNAME' % tag)]
-+            if not name:
-+                name = hdr[oldtagn]
-+                if not name:
-+                    continue
-+                (name, flag, vers) = self._filter_deps(name, hdr[oldtagf], 
hdr[oldtagv], andmask, resmask)
-+            else:
-+                flag = hdr[getattr(rpm, 'RPMTAG_%sFLAGS' % tag)]
-+                vers = hdr[getattr(rpm, 'RPMTAG_%sVERSION' % tag)]
-+            name = map(misc.share_data, name)
-+            if not name: # empty or none or whatever, doesn't matter
-+                continue
-+            flag = map(rpmUtils.miscutils.flagToString, flag)
-+            flag = map(misc.share_data, flag)
-+            vers = map(rpmUtils.miscutils.stringToVersion, vers)
-+            vers = map(lambda x: (misc.share_data(x[0]), 
misc.share_data(x[1]),
-+                                  misc.share_data(x[2])), vers)
-+            self.prco[prcotype] = map(misc.share_data, zip(name,flag,vers))
++        if not self.prco["suggests"] and not self.prco["recommends"]:
++            ds = hdr.dsFromHeader(1156)
++            if ds:
++                self._populatePrcoFiltered(ds, misc.share_data("suggests"), 1 
<< 27, 0)
++                self._populatePrcoFiltered(ds, misc.share_data("recommends"), 
1 << 27, 1 << 27)
++        if not self.prco["enhances"] and not self.prco["supplements"]:
++            ds = hdr.dsFromHeader(1159)
++            if ds:
++                self._populatePrcoFiltered(ds, misc.share_data("enhances"), 1 
<< 27, 0)
++                self._populatePrcoFiltered(ds, 
misc.share_data("supplements"), 1 << 27, 1 << 27)
      
      def tagByName(self, tag):
          warnings.warn("tagByName() will go away in a furture version of 
Yum.\n",
---- ./yum/sqlitesack.py.orig   2014-02-25 11:04:36.922061790 +0000
-+++ ./yum/sqlitesack.py        2014-02-25 12:22:10.025053554 +0000
+--- ./yum/sqlitesack.py.orig   2014-03-13 11:04:20.770615026 +0000
++++ ./yum/sqlitesack.py        2014-03-13 11:04:51.700614971 +0000
 @@ -179,7 +179,11 @@ class YumAvailablePackageSqlite(YumAvail
          self.prco = { 'obsoletes': (),
                        'conflicts': (),

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to