Re: [PATCH rhel5-branch] Ignore duplicate opening of installed rpm package file (#506361).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/14/2011 07:44 PM, Brian C. Lane wrote:
On Fri, Nov 11, 2011 at 10:55:09AM +0100, Radek Vykydal wrote:
This is second take on the fix, the first one broke some other
methods of installation (bug #752507)
The patch is relative to 5.7 not to the previous take.

Yum calls open file callback twice when installing some packages which
makes our callback try second download and fail in specific
case of nfs: method and http: additional repository.

The fail is caused by self.method.unlinkFilename(fn) in
RPMCALLBACK_INST_CLOSE_FILE being driven by method (i.e. do nothing
for nfs, remove rpm file from cache for http), not by repo in question.
In the problematic case the package of additional http repository
is not removed from cache because the install method is nfs.
As a consequence, in the second call of RPMCALLBACK_INST_OPEN_FILE
repo.getPackage(po) fails to download the package.

The second call of the OPEN_FILE callback is a bug in yum.

This looks good to me.

Um, I might be missing some background / details here, but just in case...

Yum does not issue RPMCALLBACK_INST_OPEN_FILE, rpm does. And when it does, it really needs the file: OPEN_FILE can get called a total of three times (in RHEL-5) for a given package during a transaction: once for %pretrans, once for actual install and once at %posttrans. If anaconda wont hand an open file back as requested, the rpm operation will fail.

Of those reopens %posttrans is the silly one, rpm already has installed the package but yet insists on reopening it from disk. Newer rpm versions use the already installed header from rpmdb instead to avoid requiring packages to be kept around in download cache, but in RHEL-5 packages which have %posttrans scripts need to be kept around until the whole transaction has been completed.

	- Panu -

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux