Bug 1093032 - package libzypp-plugin-appdata shows a warning because the postinstall scriptlet fails
Summary: package libzypp-plugin-appdata shows a warning because the postinstall scrip...
Status: RESOLVED DUPLICATE of bug 1009745
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Installation (show other bugs)
Version: Leap 15.0
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-12 20:25 UTC by Giacomo Comes
Modified: 2018-05-14 14:26 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Giacomo Comes 2018-05-12 20:25:50 UTC
After completing the installation of Leap 15.0 in /var/log/zypp/history I find this error:
# 2018-05-11 15:59:21 libzypp-plugin-appdata-1.0.1+git.20180327-lp150.1.1.noarch.rpm installed ok
# Additional rpm output:
# warning: %post(libzypp-plugin-appdata-1.0.1+git.20180327-lp150.1.1.noarch) scriptlet failed, exit status 6
# 

The scriptlet is the following:

if [ $1 == 1 ]; then
  ZYPP_PLUGIN_APPDATA_FORCE_COLLECT=1 zypper -n lr >/dev/null 2>&1
fi

because of the redirection it is not possible to get any error messages.
I have rebuild libzypp-plugin-appdata and taken out any redirection.
After completing a full OS installation using the modified rpm I get this error message in var/log/zypp/history:
# 2018-05-12 11:43:24 libzypp-plugin-appdata-1.0.1+git.20180327-lp150.1.1.1.noarch.rpm installed ok
# Additional rpm output:
# Warning: No repositories defined.
# Use the 'zypper addrepo' command to add one or more repositories.
# warning: %post(libzypp-plugin-appdata-1.0.1+git.20180327-lp150.1.1.1.noarch) scriptlet failed, exit status 6

to understand the reason of this scriptlet you have to look at bug 1009745.
However it is not clear to me if this is a real bug, or it is ok for the command to fail (the redirection would suggest so). If this is the case then changing the scriptlet like this:
if [ $1 == 1 ]; then
  ZYPP_PLUGIN_APPDATA_FORCE_COLLECT=1 zypper -n lr >/dev/null 2>&1
  :
fi
would get rid of the warning due to the exit status 6.
Comment 1 Martin Vidner 2018-05-14 14:26:19 UTC
https://build.opensuse.org/package/view_file/openSUSE:Factory/libzypp-plugin-appdata/libzypp-plugin-appdata.changes?expand=1 says:

Fri Apr 20 13:45:17 UTC 2018 - dimstar@opensuse.org

- Drop the post scriptlet attempting to fix boo#1009745: at the
  time this script is executed on a fresh install, the repos are
  not yet setup in the chroot, resulting in the zypper lr call to
  fail and the AS data still not being initialzied.

So I think this has been solved already.

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