Bug 1298383 - jwhois updates complain "failed to link ..."
jwhois updates complain "failed to link ..."
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: jwhois (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Vitezslav Crhonek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-13 18:13 EST by Michal Jaegermann
Modified: 2016-01-26 05:07 EST (History)
3 users (show)

See Also:
Fixed In Version: jwhois-4.0-45.fc24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-26 05:07:15 EST
Type: Bug
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 Michal Jaegermann 2016-01-13 18:13:29 EST
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 Michal Jaegermann 2016-01-13 18:25:15 EST
(Looks that I managed to submit an empty report.  Apparently I hit some button I did not intend to. Apologies.)

jwhois updates produce quite consistently, across multiple distributions, the following complaint:

failed to link /usr/share/man/man1/whois.1.gz -> /etc/alternatives/whois-man: /usr/share/man/man1/whois.1.gz exists and it is not a symlink

This is caused by the following fragment of a postinstall scriptlet:

/usr/sbin/update-alternatives \
    --install /usr/bin/whois \
        whois /usr/bin/jwhois 60 \
    --slave /usr/share/man/man1/whois.1.gz \
        whois-man /usr/share/man/man1/whois.jwhois.1.gz

if there was previously updated a version of a jwhois package where /usr/share/man/man1/whois.1.gz was actually a file.

It appears that the simplest fix would be to add to the above as the first line:

rm -f /usr/share/man/man1/whois.1.gz

Even if this would happen to remove a wanted symlink that would be immediately restored by a run of  'update-alternatives'.

jwhois-4.0-44.fc24 and other versions too.
Comment 2 Vitezslav Crhonek 2016-01-25 10:05:31 EST
Hello Michal,

I'm not able to reproduce the issue. I see no problem with ordinary jwhois installations/updates.

> if there was previously updated a version of a jwhois package where /usr/share
> /man/man1/whois.1.gz was actually a file.

How's that possible? How it can be actually a file? (We have "whois" alternative in Fedora, but moving between jwhois/whois also works as expected.)

I mean - I can "create" it like:

# touch /usr/share/man/man1/whois.1.gz
# dnf install jwhois
...
failed to link /usr/share/man/man1/whois.1.gz -> /etc/alternatives/whois-man: /usr/share/man/man1/whois.1.gz exists and it is not a symlink
...

But that's not packaging issue and won't fix that.

And by the chance... if you carry /usr/share/man/man1/whois.1.gz from pre-alternative era (November 2010, F14-15), please reinstall the package and remove the file manually:)
Comment 3 Michal Jaegermann 2016-01-25 11:02:02 EST
(In reply to Vitezslav Crhonek from comment #2)

> 
> > if there was previously updated a version of a jwhois package where /usr/share
> > /man/man1/whois.1.gz was actually a file.
> 
> How's that possible? How it can be actually a file?

Clearly some earlier version of packages in question created that.  I did not try to track a history but if I am seeing the same issue across multiple installation with a file /usr/share/man/man1/whois.1.gz which contains ".so man1/jwhois.1" that can be hardly called an accident.

BTW - at least for CentOS6, which is using jwhois-4.0-19.el6, you can see in 'rpm -qvl jwhois':

 -rw-r--r--    1 root    root                       38 Sep 23  2011 /usr/share/man/man1/whois.1.gz

Somehow I doubt that older versions of Fedora packages were that different.

> But that's not packaging issue and won't fix that.

Shrug!  It is clearly a packaging issue for updates from older versions and I suggested a trivial way of making that transition smoother at no real cost.  But if you do not want to bother this is not the end of the world.  Yeah, I modified that on my installations quite a while ago, and there is no problem there, but these complaint still resurface.
Comment 4 Vitezslav Crhonek 2016-01-26 05:07:15 EST
(In reply to Michal Jaegermann from comment #3)
> 
> BTW - at least for CentOS6, which is using jwhois-4.0-19.el6, you can see in
> 'rpm -qvl jwhois':
> 
>  -rw-r--r--    1 root    root                       38 Sep 23  2011
> /usr/share/man/man1/whois.1.gz
> 
> Somehow I doubt that older versions of Fedora packages were that different.

Well, but that's really old package, the transformation to alternatives (symlink) happened in jwhois-4.0-23, more than five years ago.

> 
> > But that's not packaging issue and won't fix that.
> 
> Shrug!  It is clearly a packaging issue for updates from older versions and
> I suggested a trivial way of making that transition smoother at no real
> cost.  But if you do not want to bother this is not the end of the world. 
> Yeah, I modified that on my installations quite a while ago, and there is no
> problem there, but these complaint still resurface.

OK, fair enough. I applied the fix you propose in Rawhide.

Anyway, thanks for the bug report.

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