Bug 21259 - Conflicts: tag mentioning own name & other version causes errors when rpm is removed
Summary: Conflicts: tag mentioning own name & other version causes errors when rpm is ...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 6.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-11-22 18:49 UTC by Todd Allen
Modified: 2007-04-18 16:29 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-11-22 18:58:06 UTC
Embargoed:


Attachments (Terms of Use)

Description Todd Allen 2000-11-22 18:49:31 UTC
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 18:58:04 UTC
=====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 17:31:45 UTC
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.