[Bug 1090346] New: zypp suppresses error output from InstallAppdata.sh
http://bugzilla.opensuse.org/show_bug.cgi?id=1090346 Bug ID: 1090346 Summary: zypp suppresses error output from InstallAppdata.sh Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.0 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 Assignee: zypp-maintainers@forge.provo.novell.com Reporter: lnussel@suse.com QA Contact: jsrain@suse.com Found By: --- Blocker: --- zypp/RepoManager.cc has special code to call /usr/lib/zypp/plugins/appdata/InstallAppdata.sh. In Bug 1090345 this command seems to have failed but there's no output to debugging due to this redirection. Please consider not redirecting to /dev/null. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1090346 Ludwig Nussel <lnussel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P2 - High -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1090346 Ludwig Nussel <lnussel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dimstar@opensuse.org -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1090346 http://bugzilla.opensuse.org/show_bug.cgi?id=1090346#c1 --- Comment #1 from Dominique Leuenberger <dimstar@opensuse.org> --- (In reply to Ludwig Nussel from comment #0)
zypp/RepoManager.cc has special code to call /usr/lib/zypp/plugins/appdata/InstallAppdata.sh. In Bug 1090345 this command seems to have failed but there's no output to debugging due to this redirection. Please consider not redirecting to /dev/null.
grmbl.. not redirecting to /dev/null is yacks - as this will give a list of repos installed at the time. Not fatal, but 'unnice' imho. of course, as this is only on install of the package (not on update) we can probably accept this cosmetic 'glitch'. Ludiwg: are you find with this? Then I'll remove the redirection in libzypp-plugin-appdata -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1090346 http://bugzilla.opensuse.org/show_bug.cgi?id=1090346#c2 --- Comment #2 from Dominique Leuenberger <dimstar@opensuse.org> --- OTOH: zypper fires up the InstallAppdata.sh async and out of control anyway - so even if that one would fail, zypp would not see errors about it (and I also doubt we would get any output from InstallAppdata itself) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1090346 http://bugzilla.opensuse.org/show_bug.cgi?id=1090346#c3 --- Comment #3 from Michael Andres <ma@suse.com> --- (In reply to Dominique Leuenberger from comment #2)
OTOH: zypper fires up the InstallAppdata.sh async and out of control anyway - so even if that one would fail, zypp would not see errors about it (and I also doubt we would get any output from InstallAppdata itself)
Yes, ZYPP is not interested in this script. It's just a trigger, publishing which repo caches have been refreshed. The gnome software installer wants to know this in order to fetch updated appdata downloaded with the repo. ZYPP just shoots and forgets. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1090346 http://bugzilla.opensuse.org/show_bug.cgi?id=1090346#c4 --- Comment #4 from Dominique Leuenberger <dimstar@opensuse.org> --- (just a side note: the fact that zypp fires and forgets is also the reason for the zombies: 2076 ? Ssl 8:48 /usr/lib/packagekitd 324 ? Z 0:00 \_ [InstallAppdata.] <defunct> 31573 ? Z 0:00 \_ [InstallAppdata.] <defunct> 11704 ? Z 0:00 \_ [InstallAppdata.] <defunct> … The longer your machine runs, the more such zombies exist) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1090346 http://bugzilla.opensuse.org/show_bug.cgi?id=1090346#c5 --- Comment #5 from Ludwig Nussel <lnussel@suse.com> --- there are actually two redirects, one in libzypp itself and then one in %post. Both should not discard stderr. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1090346 http://bugzilla.opensuse.org/show_bug.cgi?id=1090346#c6 Michael Andres <ma@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CONFIRMED --- Comment #6 from Michael Andres <ma@suse.com> --- (In reply to Dominique Leuenberger from comment #4)
(just a side note: the fact that zypp fires and forgets is also the reason for the zombies:
2076 ? Ssl 8:48 /usr/lib/packagekitd 324 ? Z 0:00 \_ [InstallAppdata.] <defunct> 31573 ? Z 0:00 \_ [InstallAppdata.] <defunct> 11704 ? Z 0:00 \_ [InstallAppdata.] <defunct> …
Good to know. Zypper exits, so we don't see zombies, but PK is long-running... Maybe we should switch to use a double-fork. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1090346 http://bugzilla.opensuse.org/show_bug.cgi?id=1090346#c7 --- Comment #7 from Dominique Leuenberger <dimstar@opensuse.org> --- Debugged that a bit - turns out that the solution implemented for bug#1009745 simply does not work in this case: at the time libzypp-plugin-appdata is being installed, there are no repos known on the system and zypper lr 'errs out' with error 6: [ 359s] [ DEBUG ]: 13:26:21 | system: (1028/1252) Installing: libzypp-plugin-appdata-1.0.1+git.20180327-81.1.noarch [.....done] [ 359s] [ DEBUG ]: 13:26:21 | system: Additional rpm output: [ 359s] [ DEBUG ]: 13:26:21 | system: warning: /var/cache/kiwi/packages/e4e75808818133322930578b916bd702/libzypp-plugin-appdata.rpm: Header V3 DSA/SHA1 Signature, key ID 629ff0c2: NOKEY [ 359s] [ DEBUG ]: 13:26:21 | system: Warning: No repositories defined. [ 359s] [ DEBUG ]: 13:26:21 | system: Use the 'zypper addrepo' command to add one or more repositories. [ 359s] [ DEBUG ]: 13:26:21 | system: warning: %post(libzypp-plugin-appdata-1.0.1+git.20180327-81.1.noarch) scriptlet failed, exit status 6 (from a GNOME-Next live media build, but the error seen on the Leap install was the same) Seems like we need a more complex solution here, possibly a one-shot service firing up whenever the system starts -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1090346 http://bugzilla.opensuse.org/show_bug.cgi?id=1090346#c8 --- Comment #8 from Ludwig Nussel <lnussel@suse.com> --- this plugin is meant to be called when repos are added resp refreshed though, right? So even if at install time of the plugin no repos were defined, they do get added at some later point and they do get refreshed. There's this code in libzypp 532 // trigger appdata refresh if some repos change 533 if ( ( _reposDirty || env::ZYPP_PLUGIN_APPDATA_FORCE_COLLECT() ) 534 && geteuid() == 0 && ( _options.rootDir.empty() || _options.rootDir == "/" ) ) 535 { So either repos are not "dirty" on initial refresh or root was not /. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1090346 http://bugzilla.opensuse.org/show_bug.cgi?id=1090346#c9 --- Comment #9 from Michael Andres <ma@suse.com> --- (In reply to Ludwig Nussel from comment #8)
this plugin is meant to be called when repos are added resp refreshed though, right? So even if at install time of the plugin no repos were defined, they do get added at some later point and they do get refreshed.
The problem is the YAST install. YAST may COPY repo files and caches into the system _after_ installation. So after reboot the repos are simply there. Some first-boot action calling 'ZYPP_PLUGIN_APPDATA_FORCE_COLLECT=1 zypper ref -f' could deliver the needed trigger. Or do this if the software installer is launched and has no descriptions at all. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1090346 http://bugzilla.opensuse.org/show_bug.cgi?id=1090346#c12 --- Comment #12 from Dominique Leuenberger <dimstar@opensuse.org> --- sr 601023 (en route to devel prj) now adds a systemd service, that fires only if /var/cache/app-info/xmls does not exist While working on this I also just rewrote the InstallAppdata shell script in py, allowing for more capabilities, should the need arise. sr 601024 (en route to devel prj) enabled the service by default in suse distros -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1090346 http://bugzilla.opensuse.org/show_bug.cgi?id=1090346#c13 --- Comment #13 from Michael Andres <ma@suse.com> --- (In reply to Dominique Leuenberger from comment #4)
(just a side note: the fact that zypp fires and forgets is also the reason for the zombies: 2076 ? Ssl 8:48 /usr/lib/packagekitd 324 ? Z 0:00 \_ [InstallAppdata.] <defunct>
JFYI: should be fixed with libzypp.17.5.1 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1090346 http://bugzilla.opensuse.org/show_bug.cgi?id=1090346#c14 Dominique Leuenberger <dleuenberger@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #14 from Dominique Leuenberger <dleuenberger@suse.com> --- This can actually be closed. libzypp-plugin-appdata comes with a service to sync the cache on bootup -- You are receiving this mail because: You are on the CC list for the bug.
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com