Bug 468754 - echo 'remove X\ninstall X' | yum shell fails
Summary: echo 'remove X\ninstall X' | yum shell fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum
Version: 5.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-27 20:05 UTC by James Antill
Modified: 2009-01-20 21:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 21:44:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0176 0 normal SHIPPED_LIVE yum bug fix update 2009-01-20 16:05:43 UTC

Description James Antill 2008-10-27 20:05:24 UTC
Description of problem:
 An optimization that went into ~3.2.19 was that you could "yum remove X" without updating all of the repositories metadata. However a bug has just been found when releasing 3.2.20 upstream that this means if you have:

yum shell <<EOL
remove X
install X
run
EOL

...where previous yum versuions would work fine, yum-3.2.19 will now fail on the "install" operation because the repository data isn't setup. The fix is below, and just 2 lines.

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

How reproducible:
always

Additional info:
diff --git a/yum/depsolve.py b/yum/depsolve.py
index 25eb0e6..579e7a1 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -91,6 +91,8 @@ class Depsolve(object):
            yet"""
         
         if self._tsInfo != None and self._ts != None:
+            if not remove_only and self._tsInfo.pkgSack is None:
+                self._tsInfo.setDatabases(self.rpmdb, self.pkgSack)
             return
             
         if not self.conf.installroot:

Comment 1 RHEL Program Management 2008-10-27 20:30:12 UTC
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.

Comment 14 errata-xmlrpc 2009-01-20 21:44:29 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/RHBA-2009-0176.html


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