Bug 1474251 - warning: %post(wireshark-gtk-2.2.8-1.fc26.x86_64) scriptlet failed, exit status 2
Summary: warning: %post(wireshark-gtk-2.2.8-1.fc26.x86_64) scriptlet failed, exit stat...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: wireshark
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Martin Sehnoutka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1472810 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-24 08:41 UTC by Kamil Páral
Modified: 2018-11-30 17:29 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-30 17:29:40 UTC
Type: Bug


Attachments (Terms of Use)

Description Kamil Páral 2017-07-24 08:41:03 UTC
Description of problem:

  Running scriptlet: wireshark-gtk-2.2.8-1.fc26.x86_64                                                          29/71 
  Upgrading        : wireshark-gtk-2.2.8-1.fc26.x86_64                                                          29/71 
  Running scriptlet: wireshark-gtk-2.2.8-1.fc26.x86_64                                                          29/71 
the primary link for wireshark must be /usr/sbin/wireshark
warning: %post(wireshark-gtk-2.2.8-1.fc26.x86_64) scriptlet failed, exit status 2
Non-fatal POSTIN scriptlet failure in rpm package wireshark-gtk
Non-fatal POSTIN scriptlet failure in rpm package wireshark-gtk
...
  Cleanup          : wireshark-cli-2.2.7-1.fc26.x86_64                                                          51/71 
  Running scriptlet: wireshark-cli-2.2.7-1.fc26.x86_64                                                          51/71 
  Cleanup          : wireshark-2.2.7-1.fc26.x86_64                                                              52/71 


Version-Release number of selected component (if applicable):
wireshark-gtk-2.2.8-1.fc26.x86_64

Comment 1 Martin Sehnoutka 2017-07-24 08:50:21 UTC
Can you provide me with output of this command?
$ sudo alternatives --display wireshark

Does it help when you remove all wireshark packages and then install them again?

Comment 2 Kamil Páral 2017-07-24 15:17:31 UTC
$ sudo alternatives --display wireshark
wireshark - status is auto.
 link currently points to /usr/sbin/wireshark-gtk
/usr/sbin/wireshark-gtk - priority 10
Current `best' version is /usr/sbin/wireshark-gtk.

> Does it help when you remove all wireshark packages and then install them
> again?

No, the same error even on a clean install.

Comment 3 Martin Sehnoutka 2017-07-25 11:51:46 UTC
The problem is that we moved wireshark binaries from /usr/sbin to /usr/bin during f26 development phase. There is a script, that was supposed to remove wireshark from alternatives and install it again, but it seems not to work.

As a workaround, you can remove all Wireshark packages, then remove alternatives with this command:
/usr/sbin/update-alternatives --remove-all wireshark
and then install wireshark again. It should be fine after that. I'll try to improve the update script, so this is done automatically.

Comment 4 Martin Sehnoutka 2017-08-09 11:27:29 UTC
*** Bug 1472810 has been marked as a duplicate of this bug. ***

Comment 5 Fedora Update System 2017-08-16 11:52:43 UTC
wireshark-2.2.8-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c0a683b4f9

Comment 6 Fedora Update System 2017-08-19 18:52:35 UTC
wireshark-2.2.8-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-c0a683b4f9

Comment 7 Enrico Tagliavini 2017-08-24 08:45:54 UTC
I've got the same issue, I've updated to wireshark-qt-2.2.8-2 from updates-testing . Unfortunately the issue is still present after the update, output of dnf shows

  Running scriptlet: wireshark-qt-2.2.8-2.fc26.x86_64                                                                                                                                                                                                                                   3/6 
which: no wireshark in (/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin)
which: no wireshark in (/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin)
the primary link for wireshark must be /usr/sbin/wireshark
warning: %post(wireshark-qt-2.2.8-2.fc26.x86_64) scriptlet failed, exit status 2
Non-fatal POSTIN scriptlet failure in rpm package wireshark-qt
Non-fatal POSTIN scriptlet failure in rpm package wireshark-qt

The output of alternatives is:

$ alternatives --display wireshark 
wireshark - status is auto.
 link currently points to /usr/sbin/wireshark-qt
/usr/sbin/wireshark-qt - priority 50
Current `best' version is /usr/sbin/wireshark-qt.

This is not a fresh Fedora 26 install, it's an upgrade from 25 did few days ago. wireshark symlink is not present at all, no idea how it gone missing, but I never touched it by hand. Nevertheless the 

if [ "$(which wireshark)" == "/usr/sbin/wireshark" ] || [ "$(which wireshark)" == "/sbin/wireshark" ];

will not be true and the fix will not be applied. Maybe change the condition to something like

if alternatives --display wireshark | grep -q '/usr/sbin/wireshark';
then
    /usr/sbin/update-alternatives --remove-all wireshark &> /dev/null || :
fi

Or maybe to a check before this if to see if which wireshark actually return something, if not reinstall the default link.

Comment 8 Martin Sehnoutka 2017-08-28 08:12:54 UTC
Unfortunately the line 
if alternatives --display wireshark | grep -q '/usr/sbin/wireshark';
won't work, because there is no line saying anything about the group link "/usr/sbin/wireshark", there is only the actual binary mentioned 3 times.

I might close this bug as WONTFIX, because it seems to be broken in a different way for everybody and I don't have the capacity to write scriptlets for everything.

Comment 9 Enrico Tagliavini 2017-08-28 08:21:14 UTC
I understand it's not easy, but leaving it unfixed is not really good. As long as it's only one package you can bear with it, but if more packages start doing such a thing...

What about a simple solution as:

if [ -z "$(which wireshark 2>/dev/null)" ] || [ "$(which wireshark)" == "/usr/sbin/wireshark" ] || [ "$(which wireshark)" == "/sbin/wireshark" ];

If you want you can even combine this in a single command

if [ -z "$(which wireshark 2>/dev/null)" -or "$(which wireshark 2>/dev/null)" == "/usr/sbin/wireshark" -or "$(which wireshark 2>/dev/null)" == "/sbin/wireshark" ];

That would also work. If you try to remove an alternative that doesn't exist it's harmless, you have the &> /dev/null || : already.

Comment 10 Kamil Páral 2017-08-28 08:34:11 UTC
(In reply to Martin Sehnoutka from comment #8)
> I might close this bug as WONTFIX, because it seems to be broken in a
> different way for everybody and I don't have the capacity to write
> scriptlets for everything.

It's better to not use alternatives rather than have it broken.

Comment 11 Enrico Tagliavini 2017-08-28 08:38:47 UTC
Oh you mean remove alternatives for wireshark and keeping the two binaries well separated? Agreed, that works indeed. Sorry I didn't understood you wanted to go this way when you said WONTFIX :)

Comment 12 Nick Cross 2017-11-24 09:54:44 UTC
I am seeing this on an upgrade to Fedora 27 and then installing wireshark-qt:

Running transaction
  Preparing        :                                                                                                                                    1/1 
  Installing       : libsmi-0.4.8-20.fc27.x86_64                                                                                                        1/5 
  Running scriptlet: libsmi-0.4.8-20.fc27.x86_64                                                                                                        1/5 
  Installing       : compat-lua-libs-5.1.5-9.fc27.x86_64                                                                                                2/5 
  Running scriptlet: compat-lua-libs-5.1.5-9.fc27.x86_64                                                                                                2/5 
  Installing       : wireshark-1:2.4.0-6.fc27.x86_64                                                                                                    3/5 
  Running scriptlet: wireshark-cli-1:2.4.0-6.fc27.x86_64                                                                                                4/5 
  Installing       : wireshark-cli-1:2.4.0-6.fc27.x86_64                                                                                                4/5 
  Running scriptlet: wireshark-cli-1:2.4.0-6.fc27.x86_64                                                                                                4/5 
  Running scriptlet: wireshark-qt-1:2.4.0-6.fc27.x86_64                                                                                                 5/5 
  Installing       : wireshark-qt-1:2.4.0-6.fc27.x86_64                                                                                                 5/5 
  Running scriptlet: wireshark-qt-1:2.4.0-6.fc27.x86_64                                                                                                 5/5 
the primary link for wireshark must be /usr/sbin/wireshark
warning: %post(wireshark-qt-1:2.4.0-6.fc27.x86_64) scriptlet failed, exit status 2
Non-fatal POSTIN scriptlet failure in rpm package wireshark-qt
Non-fatal POSTIN scriptlet failure in rpm package wireshark-qt
  Running scriptlet: wireshark-cli-1:2.4.0-6.fc27.x86_64                                                                                                5/5 
  Running scriptlet: wireshark-qt-1:2.4.0-6.fc27.x86_64                                                                                                 5/5 
  Verifying        : wireshark-qt-1:2.4.0-6.fc27.x86_64                                                                                                 1/5 
  Verifying        : wireshark-cli-1:2.4.0-6.fc27.x86_64                                                                                                2/5 
  Verifying        : compat-lua-libs-5.1.5-9.fc27.x86_64                                                                                                3/5 
  Verifying        : libsmi-0.4.8-20.fc27.x86_64                                                                                                        4/5 
  Verifying        : wireshark-1:2.4.0-6.fc27.x86_64                                                                                                    5/5

Comment 13 Ben Cotton 2018-11-27 17:58:13 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 14 Brian 'redbeard' Harrington 2018-11-28 18:14:35 UTC
This should have the version updated to Fedora 28 as it affects Fedora 28 as well (still):

  Running scriptlet: wireshark-qt-1:2.6.4-1.fc28.x86_64                                                                                                               20/140 
  Upgrading        : wireshark-qt-1:2.6.4-1.fc28.x86_64                                                                                                               20/140 
  Running scriptlet: wireshark-qt-1:2.6.4-1.fc28.x86_64                                                                                                               20/140 
the primary link for wireshark must be /usr/sbin/wireshark
warning: %post(wireshark-qt-1:2.6.4-1.fc28.x86_64) scriptlet failed, exit status 2
Non-fatal POSTIN scriptlet failure in rpm package wireshark-qt
Non-fatal POSTIN scriptlet failure in rpm package wireshark-qt

Comment 15 Ben Cotton 2018-11-30 17:29:40 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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