RPM Community Forums

Mailing List Message of <rpm-users>

Re: Force removing rpmlib(PartialHardlinkSets) from an RPM

From: Jeff Johnson <n3npq@mac.com>
Date: Thu 29 Oct 2009 - 13:35:18 CET
Message-id: <5750EE31-92E7-4CF9-9C08-D366214752B0@mac.com>

On Oct 29, 2009, at 2:12 AM, Marc MERLIN wrote:

> Very long story short, I'm building rpms with 4.4.2.1 on ubuntu
> and need to install on RH 7.1 with rpm 4.0.2.
>
> When you have stopped laughing, here's the problem :)
> I need to tell rpm to never put a rpmlib(PartialHardlinkSets) in
> the rpms it builds.
>

No laughter. I've heard older and odder problems with RPM.

>
> When I add a hardlink in the rpm, rpm 4.4.2.1 "helpfully" adds a
> rpmlib(PartialHardlinkSets) that is not relevant to my case and  
> prevents
> installing the rpm on RH 7.1 when otherwise said rpm and hardlinks  
> therein,
> work just fine.
>


> Currently, the only way I found to fix this is:
> perl -pi -e 's|rpmlib\(PartialHardlinkSets\)|rpmlib 
> (CompressedFileNames)|' scripts-1.1.20091028-0.i386.rpm
> perl -pi -e 's|8846d64e6f6f85e7d6613958acc0a9a1464ad2ef| 
> 93d6f9fdaea5908b6693fb3235320c43d70cc15d|'  
> scripts-1.1.20091028-0.i386.rpm
>
> command #1: replace property with another one of the same string  
> length
> command #2: hand fix the SHA1 signature
>

Now I'm laughing ;-)

> I'm obviously hoping that there is a way to tell rpm 4.4.2.1 to just
> not bother with rpmlib(PartialHardlinkSets)?
> (yes, the rpm after I hack the property out, installs and works just  
> fine in
> my use case)
>

The issue is a bit deeper than just changing configuration since
there's a whole installer behavior of RPM itself that is being tracked.

The reliable fix is to to just add a patch to rpm-4.4.2.1 to not
add the tracking dependency.

You can try (its very much not the right thing to do, but you are
already pretty desperate for a fix if patching digests) adding
	Provides: rpmlib(PartialHardlinkSets)
in the same package to stub-out the Requires:. I won't bore you
with the details of why its not the right thing to do. But if
you can mask the Requires: by adding a Provides: you will
likely be able to install.

Another approach to masking the Requires: would be to patch
the Provides: into rpm-4.0.2.

But if you can't rebuild either version of RPM, well, its rather
hard to retrofit forward compatibility without changing code.

73 de Jeff
Received on Thu Oct 29 13:35:40 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.