Bug 1009745

Summary: No Appstream data installed after installation
Product: [openSUSE] openSUSE Distribution Reporter: Fabian Vogt <fabian>
Component: InstallationAssignee: Dominique Leuenberger <dimstar>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P3 - Medium CC: comes, dimstar, fvogt, hel, lnussel, ma, qantas94heavy
Version: Leap 42.3   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Fabian Vogt 2016-11-11 15:23:45 UTC
After a normal installation using the DVD, plasma-discover does not show any applications and indeed, "appstreamcli status" claims it has "information on 0 software components".
This is likely because libzypp-plugin-appdata was no active during the installation and never got called again for repo-oss, as it is set as no-refresh by default.

Workaround: Run "zypper ref --force" after installation.
Comment 1 Karl Cheng 2016-11-14 11:19:54 UTC
Can reproduce in Tumbleweed snapshot 20161112 -- after installing KDE Discover, no apps are shown unless I do "zypper refresh --force".
Comment 2 Ludwig Nussel 2016-11-14 12:51:04 UTC
Michael, the plugin hooks into the repo refresh. So it can only see repos that got refreshed after the plugin is installed. Is there a way to have the plugin called for all repos that existed before the plugin installation already?
Comment 3 Michael Andres 2016-11-14 16:38:52 UTC
Actually this is something the package should be able to handle, if it gets initially installed. But problem with the DVD install might be, that YAST has not yet copied the repos into the system. On a chroot-install, we probably need to have a trigger at first boot.
Comment 4 Dominique Leuenberger 2016-11-14 17:18:46 UTC
The problem is that the pluggin, as it is now, gets a list of the active repos, their type and cache location passed as parameter;

going to just scan /var/cache/zypp sounds error prone and would match also possible disabled repo.

Hence, I don't think the plugin on its own has the sufficient information without zypp
Comment 5 Michael Andres 2016-11-15 10:50:11 UTC
Then trigger a 'zypper ref -f' collectiong the initial appdata once 
 on 1st boot (if chroot install)
 or from %posttrans after initial install
Comment 6 Fabian Vogt 2017-06-13 14:31:49 UTC
Ping!

From the comments it's not entirely clear what the current state of this issue is.

It doesn'(In reply to Michael Andres from comment #5)
> Then trigger a 'zypper ref -f' collectiong the initial appdata once 
>  on 1st boot (if chroot install)
>  or from %posttrans after initial install

Triggering a refresh of repo data within a zypper run doesn't sound like a good idea to me. Isn't it possible to just run the appdata collector?
Comment 7 Michael Andres 2017-07-06 17:59:18 UTC
Question is WHO runs such a collector? 

If it is called from within the plugin packages %post, then it will most probably not work if the package is installed using the DVD install (using any offline install/update). AFAIK yast does not transfer the repos into the system before the installation has ended. So a collector won't see the repos in use. 


Installing the package in a running system however it would be possible to call e.g.
>   ZYPP_PLUGIN_APPDATA_FORCE_COLLECT=1 zypper -n lr >/dev/null 2>&1
from within the plugin packages %post(if initial install: $1==1). 'zypper lr' is readonly, so you can call it even from within a zypper install. 

The appdata plugin package could provide a shell script called e.g. zypper-appdatarefresh, executing the above line (maybe supporting 'zypper-appdatarefresh --force' executing 'zypper -n ref -f' instead). Then you can call 'zypper-appdatarefresh' in your %post($1==1).

People can easily call 'zypper-appdatarefresh' manually (as root!) if the initial install did not collect the data. If it's installed in $PATH, it'll be available as 'zypper appdatarefresh' too, 'zypper help appdatarefresh' will display the manpage for 'zypper-appdatarefresh' (if you provide one).


If that's ok, I'd adapt libzypp to evaluate $ZYPP_PLUGIN_APPDATA_FORCE_COLLECT.
Comment 8 Michael Andres 2017-07-07 08:25:25 UTC
JFYI: ZYPP_PLUGIN_APPDATA_FORCE_COLLECT is supported in libzypp-16.13.1
Comment 9 Swamp Workflow Management 2017-08-03 19:07:54 UTC
SUSE-SU-2017:2040-1: An update that solves three vulnerabilities and has 6 fixes is now available.

Category: security (important)
Bug References: 1009745,1031756,1033236,1038132,1038984,1043218,1045735,1047785,1048315
CVE References: CVE-2017-7435,CVE-2017-7436,CVE-2017-9269
Sources used:
SUSE Linux Enterprise Software Development Kit 12-SP2 (src):    libzypp-16.15.2-27.21.1
SUSE Linux Enterprise Server for Raspberry Pi 12-SP2 (src):    libzypp-16.15.2-27.21.1, zypper-1.13.30-18.13.3
SUSE Linux Enterprise Server 12-SP2 (src):    libzypp-16.15.2-27.21.1, zypper-1.13.30-18.13.3
SUSE Linux Enterprise Desktop 12-SP2 (src):    libzypp-16.15.2-27.21.1, zypper-1.13.30-18.13.3
OpenStack Cloud Magnum Orchestration 7 (src):    libzypp-16.15.2-27.21.1, zypper-1.13.30-18.13.3
Comment 10 Swamp Workflow Management 2017-08-09 13:20:11 UTC
openSUSE-SU-2017:2111-1: An update that solves three vulnerabilities and has 6 fixes is now available.

Category: security (important)
Bug References: 1009745,1031756,1033236,1038132,1038984,1043218,1045735,1047785,1048315
CVE References: CVE-2017-7435,CVE-2017-7436,CVE-2017-9269
Sources used:
openSUSE Leap 42.2 (src):    libzypp-16.15.2-5.9.1, zypper-1.13.30-5.9.1
Comment 11 Swamp Workflow Management 2017-08-25 16:23:43 UTC
SUSE-SU-2017:2264-1: An update that solves three vulnerabilities and has 5 fixes is now available.

Category: security (important)
Bug References: 1009745,1036659,1038984,1043218,1045735,1046417,1047785,1048315
CVE References: CVE-2017-7435,CVE-2017-7436,CVE-2017-9269
Sources used:
SUSE Linux Enterprise Software Development Kit 12-SP3 (src):    libzypp-16.15.3-2.3.1, yast2-pkg-bindings-devel-doc-3.2.4-2.3.1
SUSE Linux Enterprise Server 12-SP3 (src):    libzypp-16.15.3-2.3.1, yast2-pkg-bindings-3.2.4-2.3.1
SUSE Linux Enterprise Desktop 12-SP3 (src):    libzypp-16.15.3-2.3.1, yast2-pkg-bindings-3.2.4-2.3.1
Comment 12 Swamp Workflow Management 2017-09-02 16:09:57 UTC
openSUSE-SU-2017:2335-1: An update that solves three vulnerabilities and has 5 fixes is now available.

Category: security (important)
Bug References: 1009745,1036659,1038984,1043218,1045735,1046417,1047785,1048315
CVE References: CVE-2017-7435,CVE-2017-7436,CVE-2017-9269
Sources used:
openSUSE Leap 42.3 (src):    libzypp-16.15.3-9.1, yast2-pkg-bindings-3.2.4-4.1, yast2-pkg-bindings-devel-doc-3.2.4-4.1
Comment 13 Swamp Workflow Management 2017-09-14 19:12:27 UTC
SUSE-SU-2017:2470-1: An update that solves 18 vulnerabilities and has 46 fixes is now available.

Category: security (important)
Bug References: 1004995,1009745,1014471,1017420,1019637,1026825,1027079,1027688,1027908,1028281,1028723,1029523,1031756,1032706,1033236,1035062,1036659,1038132,1038444,1038984,1042392,1043218,1043333,1044095,1044107,1044175,1044840,1045384,1045735,1045987,1046268,1046417,1046659,1046853,1046858,1047008,1047236,1047240,1047310,1047379,1047785,1047964,1047965,1048315,1048483,1048605,1048679,1048715,1049344,1050396,1050484,1051626,1051643,1051644,1052030,1052759,1053409,874665,902364,938657,944903,954661,960820,963041
CVE References: CVE-2013-7459,CVE-2016-9063,CVE-2017-1000100,CVE-2017-1000101,CVE-2017-10684,CVE-2017-10685,CVE-2017-11112,CVE-2017-11113,CVE-2017-3308,CVE-2017-3309,CVE-2017-3453,CVE-2017-3456,CVE-2017-3464,CVE-2017-7435,CVE-2017-7436,CVE-2017-8872,CVE-2017-9233,CVE-2017-9269
Sources used:
SUSE Container as a Service Platform ALL (src):    caasp-container-manifests-0.0.0+git_r155_93e40ab-2.3.3, container-feeder-0.0.0+20170901.git_r55_17ecbd3-2.3.3, sles12-mariadb-docker-image-1.1.0-2.3.10, sles12-pause-docker-image-1.1.0-2.3.11, sles12-pv-recycler-node-docker-image-1.1.0-2.3.10, sles12-salt-api-docker-image-1.1.0-2.3.9, sles12-salt-master-docker-image-1.1.0-4.3.10, sles12-salt-minion-docker-image-1.1.0-2.3.8, sles12-velum-docker-image-1.1.0-4.3.9
Comment 15 Swamp Workflow Management 2018-03-29 20:20:06 UTC
This is an autogenerated message for OBS integration:
This bug (1009745) was mentioned in
https://build.opensuse.org/request/show/592378 Factory / libzypp-plugin-appdata
Comment 16 Swamp Workflow Management 2018-03-29 22:10:06 UTC
This is an autogenerated message for OBS integration:
This bug (1009745) was mentioned in
https://build.opensuse.org/request/show/592387 Factory / libzypp-plugin-appdata
Comment 17 Swamp Workflow Management 2018-04-24 07:50:06 UTC
This is an autogenerated message for OBS integration:
This bug (1009745) was mentioned in
https://build.opensuse.org/request/show/600294 Factory / libzypp-plugin-appdata
Comment 18 Swamp Workflow Management 2018-04-26 12:20:05 UTC
This is an autogenerated message for OBS integration:
This bug (1009745) was mentioned in
https://build.opensuse.org/request/show/601527 Factory / libzypp-plugin-appdata
Comment 19 Martin Vidner 2018-05-14 14:26:20 UTC
*** Bug 1093032 has been marked as a duplicate of this bug. ***
Comment 21 Swamp Workflow Management 2018-05-14 15:50:06 UTC
This is an autogenerated message for OBS integration:
This bug (1009745) was mentioned in
https://build.opensuse.org/request/show/607084 15.0 / libzypp-plugin-appdata
Comment 22 Dominique Leuenberger 2018-05-15 13:08:56 UTC
(In reply to Swamp Workflow Management from comment #21)
> This is an autogenerated message for OBS integration:
> This bug (1009745) was mentioned in
> https://build.opensuse.org/request/show/607084 15.0 / libzypp-plugin-appdata

With this, together with systemd-present-branding merged, that issue should (finally) be resolved
Comment 23 Dominique Leuenberger 2020-06-25 14:09:16 UTC
*** Bug 1095011 has been marked as a duplicate of this bug. ***