Bug 21259 - Conflicts: tag mentioning own name & other version causes errors when rpm is removed
Conflicts: tag mentioning own name & other version causes errors when rpm is ...
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-11-22 13:49 EST by Todd Allen
Modified: 2007-04-18 12:29 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-11-22 13:58:06 EST
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 Todd Allen 2000-11-22 13:49:31 EST
We have a few little rpm's which contain no actual files but only %post and
%postun scripts that create soft links.  The reason is that they must
figure out the targets of the soft links as they execute because the
targets are in relocatable packages.

We want to ensure that a user cannot install two versions of any one of
these softlink packages simultaneously.  We were surprised (pleasantly)
that you could install two versions of the same rpm so long as they didn't
contain any of the same files.  (Now that we know that's possible, we plan
to use that fact to allow multiple versions of some of our software to be
installed.  We had been planning to make the version numbers part of the
Names.  Now we don't have to do that, and things will be cleaner.)

But there's still the problem with the softlink rpm's which must arrange to
be mutually exclusive with other versions of themselves.  After some
experimentation, we discovered that the following style of header was the
only way we could ensure that.  Here's a genericized excerpt:

Name: links
Version: 4.3
Conflicts: links < 4.3 links > 4.3

(If there's a better way to achieve this, please let me know.  I couldn't
find one.)

That works just fine, disallowing the cases we were worried about, and
allowing the ones we want.  The only problem is that when you try to remove
an rpm with this style of Conflicts:, you get this error:

package links not found in conflict index

The removal does work, so this is just a pesky error.
Comment 1 Todd Allen 2000-11-22 13:58:04 EST
=====Example specs (first):
Summary: links
Name: links
Version: 4.3
Release: 1
Copyright: BSD
Group: System Environment/Shells
AutoReqProv: no
Conflicts: links < 4.3 links > 4.3
%description
A softlink

%prep

%build

%install

%clean

%files

%post
#
# In reality, /bin/ksh here would be determined as the script runs, but I'm
# keeping it simple.
#
ln -s /bin/ksh /usr/opt/softlink

%postun
rm -f /usr/opt/softlink

=====(second):
Summary: links
Name: links
Version: 5.0
Release: 1
Copyright: BSD
Group: System Environment/Shells
AutoReqProv: no
Conflicts: links < 5.0 links > 5.0
%description
A softlink

%prep

%build

%install

%clean

%files

%post
#
# In reality, /bin/bash here would be determined as the script runs, but I'm
# keeping it simple.
#
ln -s /bin/bash /usr/opt/softlink

%postun
rm -f /usr/opt/softlink
Comment 2 Jeff Johnson 2000-12-03 12:31:45 EST
The error message is what's wrong. At package removal, all occurences of the
same
name are flushed from the conflicts inverted list. The 1st occurence of the
dependency
is flushing all dependencies, the 2nd ocurrence is complaining that the 1st
occurence
has already flushed references to the package being removed.

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