yast / yast-yast2

YaST module yast2
http://en.opensuse.org/Portal:YaST
GNU General Public License v2.0
54 stars 44 forks source link

Fixed libzypp initialization (related to bsc#1199840) #1263

Closed lslezak closed 1 year ago

lslezak commented 1 year ago

Problem

Details

It turned out that the problem is in the Pkg.GetSolverFlags call which is called before initializing libzypp. In that case libzypp automatically initializes itself, but it uses by default the system root (/) which is the container. The libzypp initialization later done from YaST does not change anything as libzypp is already initialized.

Also it initialized the libzypp in a wrong order. The libzypp target always needs to be initialized before initializing the libzypp sources. The reason is that the target defines which GPG keys and config file (zypp.conf) are used. When initializing in wrong order you might get GPG signature errors.

Solution

Testing

coveralls commented 1 year ago

Coverage Status

Coverage decreased (-0.0008%) to 41.636% when pulling e1b1c7f6eb140ca8a582f019ad348cbd29eb1489 on packages_in_container into 03e8ef6deed3e348cd631622d827234bd94e0c70 on master.

yast-bot commented 1 year ago

:heavy_check_mark: Public Jenkins job #374 successfully finished :heavy_check_mark: Created OBS submit request #991428