Bugzilla – Bug 1227625
in %post (core dumped) ZYPP_READONLY_HACK=1 zypper refresh-services
Last modified: 2024-07-15 15:50:15 UTC
Created attachment 875993 [details] zypper.log from leap16 Using zypper refresh-services in %post crashes the post-script See line 345 in https://build.opensuse.org/projects/Base:System/packages/openSUSE-repos/files/openSUSE-repos.spec?expand=1 Using the add-service with READONLY_HACK and is working, however not regen of repos that most people complain about (missing after initial install etc). %post /var/tmp/rpm-tmp.4eukQ3: line 25: 8351 Aborted (core dumped) ZYPP_READONLY_HACK=1 zypper refresh-services
Fix should be sent also to SLE/LeapMicro 6.X otherwise the automatic-updates would not work once we release openSUSE-repos package update (failure in post would report unsuccessful update).
lkocman@localhost:~/agama> ssh root@192.168.100.146 Last login: Wed Jul 10 14:06:16 CEST 2024 from 192.168.100.1 on ssh Have a lot of fun... leap16:~ # zypper refs Refreshing service 'openSUSE'. terminate called after throwing an instance of 'std::optional<zypp::repo::ServicePluginInformalException>' Aborted (core dumped) leap16:~ # rpm -ql openSUSE-repos-Leap /etc/zypp/services.d/openSUSE.service /etc/zypp/vars.d/DIST_ARCH /usr/share/zypp/local /usr/share/zypp/local/service /usr/share/zypp/local/service/openSUSE /usr/share/zypp/local/service/openSUSE/repo /usr/share/zypp/local/service/openSUSE/repo/opensuse-leap-repoindex.xml /usr/share/zypp/local/service/openSUSE/repo/repoindex.xml leap16:~ # vim /usr/share/zypp/local/service/openSUSE/repo/opensuse-leap-repoindex.xml leap16:~ # zypper refs Refreshing service 'openSUSE'. All services have been refreshed. Issue was specifically in /usr/share/zypp/local/service/openSUSE/repo/opensuse-leap-repoindex.xml where I missed the quote at the end of the line ... <repo url="%{disturl}/repositories/openSUSE:/Leap:/16.0/standard/"
https://github.com/openSUSE/openSUSE-repos/pull/68
https://build.opensuse.org/request/show/1186595 and https://build.opensuse.org/request/show/1186594
Do we want to have special handlding for invalid xml files, or shall we close this as resolved?
https://github.com/openSUSE/openSUSE-repos/issues/69
Let's keep it open for now and I'll close it later. Regardless of the parse error, I see an 'Error: signal 6' in the log and this should not be there. We'll have to rewiew the error reporting and handling.
The log indicates that a std::optional<zypp::repo::ServicePluginInformalException> has been thrown instead of the exception itself. This should not happen, since the calling code can not correctly catch it, resulting in a std::terminate
> hobbes:~ (134)# zypper refresh-services > Refreshing service 'opensSUSE'. > Problem retrieving the repository index file for service 'opensSUSE': > [|] Parse error: repoindex.xml[21] Couldn't find end of Start Tag repo > History: > - Parse error: repoindex.xml[21] Couldn't find end of Start Tag repo > - repoindex.xml[21] attributes construct error > - repoindex.xml[21] error parsing attribute name > > Warning: Skipping service 'opensSUSE' because of the above error. > All services have been refreshed. That's how it will look like with libzypp-17.35.2