Bug 604277 - mrepo fails to obtain createrepo version number, breaks metadata generation
mrepo fails to obtain createrepo version number, breaks metadata generation
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mrepo (Show other bugs)
12
All Linux
low Severity medium
: ---
: ---
Assigned To: James Findley
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-15 14:57 EDT by Kelvin Ku
Modified: 2010-07-30 04:38 EDT (History)
3 users (show)

See Also:
Fixed In Version: mrepo-0.8.7-1.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-29 21:04:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kelvin Ku 2010-06-15 14:57:23 EDT
Description of problem:

mrepo fails to obtain the createrepo version number. This prevents the repomd format metadata from being generated.

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

mrepo-0.8.6-5.fc12.noarch

How reproducible:

Always

Steps to Reproduce:
1. Configure a repomd format repo
2. Run mrepo, e.g., with "mrepo -fg <repo>"
  
Actual results:

$ mrepo -c scratch/mrepo.conf -fg f12-i386
/usr/bin/mrepo:18: DeprecationWarning: The popen2 module is deprecated.  Use the subprocess module.
  import os, sys, glob, re, shutil, getopt, popen2
/usr/bin/mrepo:19: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  import ConfigParser, urlparse, sha, types, traceback
f12-i386: Generating Fedora Core 12 (i386) meta-data
mrepo: f12-i386: Version of createrepo could not be found. Assuming newer than 0.4.6.
mrepo: f12-i386: Version of createrepo could not be found. Assuming newer than 0.4.6.
Error: groupfile /extra_disk/mrepo/www/f12-i386/RPMS.releases/RPMS.releases/comps.xml cannot be found.
mrepo: Generating repo failed for releases with message:
  /usr/bin/createrepo failed with return code: 256
mrepo: f12-i386: Version of createrepo could not be found. Assuming newer than 0.4.6.
Error: groupfile /extra_disk/mrepo/www/f12-i386/RPMS.updates/RPMS.updates/comps.xml cannot be found.
mrepo: Generating repo failed for updates with message:
  /usr/bin/createrepo failed with return code: 256


Expected results:

Success, creation of metadata

Additional info:

These lines in mrepo (/usr/bin/mrepo) attempt to get the createrepo version number from the "genpkgmetadata" class:

 813         ### Find the createrepo version we are using (due to groupfile usage changes)
 814         createrepo_version = None
 815         groupfilename = 'RPMS.%s/comps.xml' % self.name
 816         try:
 817             sys.path.append("/usr/share/createrepo")
 818             import genpkgmetadata
 819             createrepo_version = genpkgmetadata.__version__
 820             sys.path.remove("/usr/share/createrepo")
 821             del genpkgmetadata
 822         except:
 823             pass

whereas __version__ has been moved to the "createrepo" class in some revision of creatrepo. This patch makes it work:

--- /usr/bin/mrepo      2009-10-18 15:35:58.000000000 -0400
+++ mrepo       2010-06-15 14:20:01.197548000 -0400
@@ -18,6 +18,7 @@
 import os, sys, glob, re, shutil, getopt, popen2
 import ConfigParser, urlparse, sha, types, traceback
 import time
+import createrepo
 
 __version__ = "$Revision: 6444 $"
 # $Source$
@@ -811,16 +812,8 @@
             raise mrepoGenerateException('Command createrepo is not found. Skipping.')
 
         ### Find the createrepo version we are using (due to groupfile usage changes)
-        createrepo_version = None
         groupfilename = 'RPMS.%s/comps.xml' % self.name
-        try:
-            sys.path.append("/usr/share/createrepo")
-            import genpkgmetadata
-            createrepo_version = genpkgmetadata.__version__
-            sys.path.remove("/usr/share/createrepo")
-            del genpkgmetadata
-        except:
-            pass
+        createrepo_version = createrepo.__version__
 
         ### If version < 0.4.6, then use the old createrepo behaviour
         if not createrepo_version:
Comment 1 Susi Lehtola 2010-06-16 15:08:05 EDT
I'm hoping upstream (Dag) will fix this. I'm a bit reluctant to do such a drastic change, without knowing what might break as a result.

In fact, I'm not involved any more with the mainership of local Fedora install mirrors, so mrepo is one of the odd packages in my group, and I'm probably going to orphan it soon.
Comment 2 Fedora Admin XMLRPC Client 2010-07-05 08:34:20 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 3 Fedora Update System 2010-07-08 08:38:22 EDT
mrepo-0.8.7-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/mrepo-0.8.7-1.fc12
Comment 4 Fedora Update System 2010-07-08 08:38:37 EDT
mrepo-0.8.7-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/mrepo-0.8.7-1.fc13
Comment 5 Fedora Update System 2010-07-08 14:14:49 EDT
mrepo-0.8.7-1.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mrepo'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/mrepo-0.8.7-1.fc12
Comment 6 Fedora Update System 2010-07-08 14:15:08 EDT
mrepo-0.8.7-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mrepo'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/mrepo-0.8.7-1.fc13
Comment 7 Fedora Update System 2010-07-09 11:26:38 EDT
mrepo-0.8.7-1.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/mrepo-0.8.7-1.el5
Comment 8 Fedora Update System 2010-07-09 14:56:43 EDT
mrepo-0.8.7-1.el5 has been pushed to the Fedora EPEL 5 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mrepo'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/mrepo-0.8.7-1.el5
Comment 9 Fedora Update System 2010-07-29 21:04:43 EDT
mrepo-0.8.7-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 Fedora Update System 2010-07-30 04:32:13 EDT
mrepo-0.8.7-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 11 Fedora Update System 2010-07-30 04:38:17 EDT
mrepo-0.8.7-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.