Bug 502060

Summary: Generated yum repodata incorrect
Product: Red Hat Satellite 5 Reporter: Mike McCune <mmccune>
Component: ServerAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Sklenar <psklenar>
Severity: medium Docs Contact:
Priority: low    
Version: 530CC: cperry, jhutar, mmccune, slukasik
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sat530 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 502059 Environment:
Last Closed: 2009-09-10 18:41:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 485807    

Description Mike McCune 2009-05-21 17:20:04 UTC
+++ This bug was initially created as a clone of Bug #502059 +++

Description of problem:

Generated yum repodata incorrect, preventing sensible yum behaviour.

Version-Release number of selected component (if applicable):

Tested against spacewalk 0.5.

How reproducible:

Everytime

Steps to Reproduce:
1.  Push gcc-c++-4.1.2-44.el5 into the repo
2.  Pull down the primary.xml.gz
  
Actual results:

The provides for the package are incorrect, only specifying one of the two package provides.

Expected results:

Both package provides are present.

Additional info:

http://fpaste.org/paste/12541

This causes *major* pain as it means dependencies are generated incorrectly, preventing upgrades from happening as desired (such as between 5.2 and 5.3).

If you try a yum upgrade, you'll find it fails, as gcc-c++-4.1.2-44.el5 doesn't actually provide gcc-c++-4.1.2-44.el5, somewhat ruining the dependency checking.

--- Additional comment from mmccune on 2009-05-21 13:17:17 EDT ---

Spacewalk 0.5 generated primary.xml.gz:

<package type="rpm">
 <name>gcc-c++</name>
 <arch>x86_64</arch>
 <version ver="4.1.2" rel="44.el5" epoch="0"/>
 <checksum type="md5" pkgid="YES">9efbcdba62ca5231cdfae5f0bdb41408</checksum>
 <summary>C++ support for GCC </summary>
 <description>This package adds C++ support to the GNU Compiler Collection.  It includes support for most of the current C++ specification, including templates and exception handling.</description>
 <packager/>
 <url/>
 <time file="1232546097" build="1232546097"/>
 <size package="3988710" archive="0" installed=""/>
 <location href="getPackage/gcc-c++-4.1.2-44.el5.x86_64.rpm"/>
 <format>
  <rpm:license>GPL</rpm:license>
  <rpm:vendor>CentOS</rpm:vendor>
  <rpm:group>Development/Languages</rpm:group>
  <rpm:buildhost>builder10.centos.org</rpm:buildhost>
  <rpm:sourcerpm>gcc-4.1.2-44.el5.src.rpm</rpm:sourcerpm>
  <rpm:header-range start="440" end="66648"/>
  <rpm:provides>
   <rpm:entry name="gcc-c++" flags="EQ" epoch="0" ver="4.1.1" rel="52.el5"/>
  </rpm:provides>
  <rpm:requires>
   <rpm:entry name="rpmlib(CompressedFileNames)" flags="LE" epoch="0" ver="3.0.4" rel="1"/>
   <rpm:entry name="rpmlib(PayloadFilesHavePrefix)" flags="LE" epoch="0" ver="4.0" rel="1"/>
   <rpm:entry name="libc.so.6(GLIBC_2.4)(64bit)"/>
   <rpm:entry name="libc.so.6()(64bit)"/>
   <rpm:entry name="rpmlib(PartialHardlinkSets)" flags="LE" epoch="0" ver="4.0.4" rel="1"/>
   <rpm:entry name="libc.so.6(GLIBC_2.2.5)(64bit)"/>
   <rpm:entry name="libc.so.6(GLIBC_2.3)(64bit)"/>
   <rpm:entry name="rtld(GNU_HASH)"/>
   <rpm:entry name="rpmlib(VersionedDependencies)" flags="LE" epoch="0" ver="3.0.3" rel="1"/>
   <rpm:entry name="libstdc++.so.6()(64bit)"/>
   <rpm:entry name="gcc" flags="EQ" epoch="0" ver="4.1.2" rel="44.el5"/>
   <rpm:entry name="libstdc++" flags="EQ" epoch="0" ver="4.1.2" rel="44.el5"/>
   <rpm:entry name="libstdc++-devel" flags="EQ" epoch="0" ver="4.1.2" rel="44.el5"/>
  </rpm:requires>
  <rpm:conflicts/>
  <rpm:obsoletes>
   <rpm:entry name="gcc34-c++"/>
   <rpm:entry name="gcc3-c++"/>
   <rpm:entry name="gcc35-c++"/>
   <rpm:entry name="gcc4-c++"/>
  </rpm:obsoletes>
  <file>/usr/bin/g++</file>
  <file>/usr/bin/x86_64-redhat-linux-c++</file>
  <file>/usr/bin/c++</file>
  <file>/usr/bin/x86_64-redhat-linux-g++</file>
 </format>
</package>


Official CentOS primary.xml.gz:

<package type="rpm">
 <name>gcc-c++</name>
 <arch>x86_64</arch>
 <version epoch="0" ver="4.1.2" rel="44.el5"/>
 <checksum type="sha" pkgid="YES">5ce5a67e049b4c5b329ee5a55043173e7c1ef011</checksum>
 <summary>C++ support for GCC</summary>
 <description>This package adds C++ support to the GNU Compiler Collection.  It includes support for most of the current C++ specification, including templates and exception handling.</description>
 <packager/>
 <url>http://gcc.gnu.org</url>
 <time file="1237289534" build="1232546097"/>
 <size package="3988710" installed="7822918" archive="7828716"/>
 <location href="CentOS/gcc-c++-4.1.2-44.el5.x86_64.rpm"/>
 <format>
  <rpm:license>GPL</rpm:license>
  <rpm:vendor>CentOS</rpm:vendor>
  <rpm:group>Development/Languages</rpm:group>
  <rpm:buildhost>builder10.centos.org</rpm:buildhost>
  <rpm:sourcerpm>gcc-4.1.2-44.el5.src.rpm</rpm:sourcerpm>
  <rpm:header-range start="440" end="66644"/>
  <rpm:provides>
   <rpm:entry name="gcc-c++" flags="EQ" epoch="0" ver="4.1.2" rel="44.el5"/>
   <rpm:entry name="gcc-c++" flags="EQ" epoch="0" ver="4.1.1" rel="52.el5"/>
  </rpm:provides>
  <rpm:obsoletes>
   <rpm:entry name="gcc3-c++"/>
   <rpm:entry name="gcc35-c++"/>
   <rpm:entry name="gcc4-c++"/>
   <rpm:entry name="gcc34-c++"/>
  </rpm:obsoletes>
  <rpm:requires>
   <rpm:entry name="libstdc++" flags="EQ" epoch="0" ver="4.1.2" rel="44.el5"/>
   <rpm:entry name="libc.so.6(GLIBC_2.3)(64bit)"/>
   <rpm:entry name="rpmlib(PayloadFilesHavePrefix)" flags="LE" epoch="0" ver="4.0" rel="1" pre="1"/>
   <rpm:entry name="libstdc++.so.6()(64bit)"/>
   <rpm:entry name="libstdc++-devel" flags="EQ" epoch="0" ver="4.1.2" rel="44.el5"/>
   <rpm:entry name="rpmlib(CompressedFileNames)" flags="LE" epoch="0" ver="3.0.4" rel="1" pre="1"/>
   <rpm:entry name="libc.so.6(GLIBC_2.4)(64bit)"/>
   <rpm:entry name="rpmlib(PartialHardlinkSets)" flags="LE" epoch="0" ver="4.0.4" rel="1" pre="1"/>
   <rpm:entry name="rtld(GNU_HASH)"/>
   <rpm:entry name="libc.so.6()(64bit)"/>
   <rpm:entry name="gcc" flags="EQ" epoch="0" ver="4.1.2" rel="44.el5"/>
   <rpm:entry name="rpmlib(VersionedDependencies)" flags="LE" epoch="0" ver="3.0.3" rel="1" pre="1"/>
   <rpm:entry name="libc.so.6(GLIBC_2.2.5)(64bit)"/>
  </rpm:requires>
  <file>/usr/bin/c++</file>
  <file>/usr/bin/x86_64-redhat-linux-g++</file>
  <file>/usr/bin/g++</file>
  <file>/usr/bin/x86_64-redhat-linux-c++</file>
 </format>
</package>

--- Additional comment from mmccune on 2009-05-21 13:19:35 EDT ---

I reproduced this on rlx-0-04 which is spacewalk 0.5.

* Create empty test-channel
* wget http://mirror.centos.org/centos/5/os/i386/CentOS/gcc-c++-4.1.2-44.el5.i386.rpm
* rhnpush -vvv --user=*** --password=**** --channel=test-channel --server=localhost gcc-c++-4.1.2-44.el5.i386.rpm  
* Extracted the metadata from /var/cache/rhn:

<location href="getPackage/gcc-c++-4.1.2-44.el5.i386.rpm"/>   
<rpm:provides>
  <rpm:entry name="gcc-c++" flags="EQ" epoch="0" ver="4.1.1" rel="52.el5"/>
</rpm:provides>


Note the missing 4.1.2-44

Comment 3 Petr Sklenar 2009-06-29 16:52:26 UTC
verified

1. Satellite-5.3.0-RHEL5-re20090625.0, x8664
2. wget http://mirror.centos.org/centos/5/os/i386/CentOS/gcc-c++-4.1.2-44.el5.i386.rpm
3. rhnpush -vvv --user=*** --password=**** --channel=testing-channel-i386
--server=localhost gcc-c++-4.1.2-44.el5.i386.rpm  
4. Extracted the metadata from /var/cache/rhn:
zcat /var/cache/rhn/repodata/testing-channel/primary.xml.gz :


<rpm:provides>
<rpm:entry name="gcc-c++" flags="EQ" epoch="0" ver="4.1.1" rel="52.el5"/><rpm:entry name="gcc-c++" flags="EQ" epoch="0" ver="4.1.2" rel="44.el5"/></rpm:provides>


5. rpm  -qp --provides gcc-c++-4.1.2-44.el5.i386.rpm 
gcc-c++ = 4.1.1-52.el5
gcc-c++ = 4.1.2-44.el5

-----------------
passed

Comment 5 Brandon Perkins 2009-09-10 18:41:18 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1434.html