Bug 627215

Summary: antlr upgrade path issues
Product: [Fedora] Fedora Reporter: Hans de Goede <hdegoede>
Component: antlrAssignee: Milos Jakubicek <xjakub>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: johnthacker, xjakub
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-15 15:59:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hans de Goede 2010-08-25 12:08:04 UTC
Hi,

While upgrading from F-13 to F-14 I noticed that the antlr package was an orphan,
the main "antlr" package that is, there now is antlr-C++ and antlr-tool.

This is a problem as this means that the old antlr package will not automatically get replaced by the new ones. This means that the old antlr package needs to be
obsoleted by one of the new packages, also many packages depend on the jave bits of antlr and do so by requiring antlr:

[hans@localhost ~]$ sudo repoquery -q --whatrequires antlr
ant-antlr-0:1.7.1-13.fc13.x86_64
antlr3-tool-0:3.2-7.fc14.noarch
checkstyle-0:5.1-1.fc14.noarch
eclipse-epic-0:0.6.35-2.fc12.noarch
gluegen-0:1-0.20102502svn11.fc14.x86_64
groovy-0:1.7.2-2.fc14.noarch
ws-jaxme-0:0.5.1-4.4.fc12.noarch

So it probably is best to rename antlr-tool back to antlr and make the main package obsolete and provide antlr-tool for a clean upgrade path for people who have the new split package installed.

Note that once antlr-tool has been renamed to antlr there are still issues as the old antlr used alternatives to allow choosing between the java and gcj versions of the tool.

If the old antlr gets upgraded (rather then removed) the alternatives database entry will stay around. To fix this the new antlr package should have a %pre removing the alternatives:


%pre/usr/sbin/update-alternatives --remove antlr /usr/bin/antlr-java &> /dev/null || :
/usr/sbin/update-alternatives --remove antlr /usr/bin/antlr-native &> /dev/null || :

Notice the &> to eat any error output and the || : to suppress any error exit status (in case the alternative is already removed).

Comment 1 John Thacker 2011-01-15 15:59:27 UTC

*** This bug has been marked as a duplicate of bug 603466 ***