Bug 802784

Summary: make repodiff handle local repos even without the file:// prefix
Product: Red Hat Enterprise Linux 6 Reporter: Karel Srot <ksrot>
Component: yum-utilsAssignee: James Antill <james.antill>
Status: CLOSED ERRATA QA Contact: Karel Srot <ksrot>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: jzeleny, pschiffe, tcallawa, vmukhame
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: yum-utils-1.1.30-23.el6 Doc Type: Bug Fix
Doc Text:
NO DOCS NEEDED
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-14 04:37:42 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:

Description Karel Srot 2012-03-13 13:58:22 UTC
Description of problem:

repodiff manpage contains:

EXAMPLES
       Compare source pkgs in two local repos:
              repodiff --old=/tmp/repo-old --new=/tmp/repo-new

       Compare x86_64 compat. binary pkgs in two remote repos, and  two  local
       one:
              repodiff    -a     x86_64     --old=http://example.com/repo1-old
              --old=/tmp/repo-old           --new=http://example.com/repo1-new
              --new=/tmp/repo-new

       Compare x86_64 compat. binary pkgs, but also compare arch:
              repodiff    -a    x86_64    --compare-arch    --old=http://exam-
              ple.com/repo1-old     --old=/tmp/repo-old     --new=http://exam-
              ple.com/repo1-new --new=/tmp/repo-new



But the local repos should be specified as file:///tmp/repo-old. Simple /tmp/repo-old is not valid.


Version-Release number of selected component (if applicable):
yum-utils-1.1.30-11.el6

Comment 2 Suzanne Logcher 2012-05-18 20:52:37 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 James Antill 2013-04-09 21:41:28 UTC
I fixed this upstream by fixing the code instead:

commit ec05547a9bb900f01ee0261f0e8c456101605fe2
Author: James Antill <james>
Date:   Tue Apr 9 17:40:16 2013 -0400

    Allow --old=/foo urls for repodiff.

diff --git a/repodiff.py b/repodiff.py
index c16c03e..003294c 100755
--- a/repodiff.py
+++ b/repodiff.py
@@ -53,6 +53,8 @@ class DiffYum(yum.YumBase):
         newrepo.name = repoid
         if baseurl.startswith("mirror:"):
             newrepo.mirrorlist = baseurl[len("mirror:"):]
+        elif baseurl.startswith("/"):
+            newrepo.baseurl = ["file:" + baseurl]
         else:
             newrepo.baseurl = [baseurl]
         newrepo.basecachedir = self.dy_basecachedir

Comment 6 RHEL Program Management 2013-10-14 00:45:52 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 11 errata-xmlrpc 2014-10-14 04:37:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1411.html