Kiwi cache generation: Dependency solver only recognizes package name

26 views
Skip to first unread message

Till Dörges

unread,
Aug 27, 2015, 4:20:08 PM8/27/15
to kiwi-...@googlegroups.com
Hi all,

it appears that the dependency solver that kiwi uses for cache generation is less
powerful then the one during stage 1 or 2.

IMHO that's a bug. At least it's unexpected behavior.


I called kiwi as follows

kiwi --init-cache /path/to/dir/with/config.xml --cache /var/cache/mykiwi

my config.xml contained a line

<package name="netcat"/>

Which lead to the following error

--- snip ---
Aug-27 22:12:22 <1> : Reading image description [Cache]...
Aug-27 22:12:22 <1> : Initialize image cache...
Aug-27 22:12:22 <1> : --> Building cache wds_1...
Aug-27 22:12:22 <1> : Setting up SaT solver...
Aug-27 22:12:22 <1> : --> Using libsolv binding
Aug-27 22:12:22 <1> : --> Loading
http://.../opensuse/live/distribution/13.1/repo/non-oss/...
done
Aug-27 22:12:23 <1> : --> Loading http://.../opensuse/live/distribution/13.1/redoness/...
Aug-27 22:12:23 <1> : --> Loading http://.../opensuse/live/update/13.1/... done
Aug-27 22:12:26 <2> : --> Failed to queue job: netcat
skipped
Aug-27 22:12:26 <3> : SaT solver failed jobs found !
Aug-27 22:12:26 <1> : No packages/patterns solved
Aug-27 22:12:26 <1> : Closing session with ecode: 1
Aug-27 22:12:26 <3> : KIWI exited with error(s)
--- snap ---


The very same config.xml works fine for normal kiwi operation.


If I replace the offending line with

<package name="netcat-openbsd"/>

cache generation works, too.


The package name is netcat-openbsd:

box:~ # rpm -q netcat-openbsd
netcat-openbsd-1.89-90.1.2.x86_64

But it does provide netcat:

box:~ # rpm -q --provides netcat-openbsd
nc6 = 1.89
netcat = 1.89
netcat-openbsd = 1.89-90.1.2
netcat-openbsd(x86-64) = 1.89-90.1.2



This is on openSUSE 13.1 with this version of kiwi:

box:~ # kiwi --version
Aug-27 22:13:37 <1> : Version:
Aug-27 22:13:37 <1> : --> vnr: 7.03.14
Aug-27 22:13:37 <1> : --> git: 1f478cf99e795a2e5b81ea5585f5e39b25c499d4



Regards -- Till
--
Dipl.-Inform. Till Dörges doe...@pre-sense.de
Tel. +49 - 40 - 244 2407 - 14
Fax +49 - 40 - 244 2407 - 24
PRESENSE Technologies GmbH Sachsenstr. 5, D-20097 HH
Geschäftsführer/Managing Directors AG Hamburg, HRB 107844
Till Dörges, Jürgen Sander USt-IdNr.: DE263765024

Robert Schweikert

unread,
Aug 27, 2015, 5:15:09 PM8/27/15
to kiwi-...@googlegroups.com
On 08/27/2015 04:20 PM, Till Dörges wrote:
> Hi all,
>
> it appears that the dependency solver that kiwi uses for cache generation is less
> powerful then the one during stage 1 or 2.

There is only one solver and that's the SAT solver. kiwi uses the Perl
interface to the SATsolver.

>
> IMHO that's a bug. At least it's unexpected behavior.
>
>
> I called kiwi as follows
>
> kiwi --init-cache /path/to/dir/with/config.xml --cache /var/cache/mykiwi
>
> my config.xml contained a line
>
> <package name="netcat"/>
>
> Which lead to the following error

What happens when you just get the package list:

kiwi --info PATH_TO_CONFIG_DIR -select packages

Later,
Robert

--
Robert Schweikert MAY THE SOURCE BE WITH YOU
Public Cloud Architect LINUX
rjsc...@suse.com
IRC: robjo

signature.asc

Marcus Schäfer

unread,
Aug 28, 2015, 5:05:10 AM8/28/15
to kiwi-...@googlegroups.com
Hi,

> it appears that the dependency solver that kiwi uses for cache
> generation is less powerful then the one during stage 1 or 2.

To some degree this is true. For the purpose of installing a package
kiwi supports the distro native package installation backends. This
means for SUSE it's zypper, for rhel it's yum, and so forth

However for the task of resolving a list of packages taking the
repo metadata into account, kiwi uses the resolver library directly
and not the tool e.g zypper which is linked against this library

Unfortunately zypper adds some additional features on top of the
resolver library which results in the problem you ran into.
The "Provides" information is an additional meta data which is not
taken into account when using the plain solver library (libsolv)
but zypper knows that the provider of "netcat" means to resolve
on of the packages netcat-openbsd, netcat-something

This is why just asking the plain solver library for netcat fails

I don't see this to be a critical problem because all you need to
do is to be specific about the package in your XML description.
If you say:

<package name="netcat-openbsd"/>

it makes it absolutely clear what you want and that also fixes
the plain solver operation

If you use the meta provides name you don't know exactly what you
get it depends on what the repo really provides.

From my experience it causes less pain to be precise as much as
possible in the image description to avoid unwanted surprises

Hope that makes sense

Regards,
Marcus
--
Public Key available via: https://keybase.io
keybase search marcus_schaefer
-------------------------------------------------------
Marcus Schäfer (Res. & Dev.) SUSE Linux GmbH
Tel: 0911-740 53 0 Maxfeldstrasse 5
FAX: 0911-740 53 479 D-90409 Nürnberg
HRB: 21284 (AG Nürnberg) Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
http://www.suse.de
-------------------------------------------------------

Till Dörges

unread,
Aug 28, 2015, 5:19:10 AM8/28/15
to kiwi-...@googlegroups.com
Marcus Schäfer wrote:

> Unfortunately zypper adds some additional features on top of the
> resolver library which results in the problem you ran into.
> The "Provides" information is an additional meta data which is not
> taken into account when using the plain solver library (libsolv)
> but zypper knows that the provider of "netcat" means to resolve
> on of the packages netcat-openbsd, netcat-something
>
> This is why just asking the plain solver library for netcat fails
[...]
> Hope that makes sense

It does. :-)

Thanks -- Till

Till Dörges

unread,
Aug 28, 2015, 6:34:50 AM8/28/15
to kiwi-...@googlegroups.com
Am 27.08.2015 um 22:20 schrieb Till Dörges:

Robert Schweikert wrote:

> On 08/27/2015 04:20 PM, Till Dörges wrote:
>> it appears that the dependency solver that kiwi uses for cache generation is less
>> powerful then the one during stage 1 or 2.
>
> There is only one solver and that's the SAT solver. kiwi uses the Perl
> interface to the SATsolver.
>
>>
>> IMHO that's a bug. At least it's unexpected behavior.
>>
>>
>> I called kiwi as follows
>>
>> kiwi --init-cache /path/to/dir/with/config.xml --cache /var/cache/mykiwi
>>
>> my config.xml contained a line
>>
>> <package name="netcat"/>
>>
>> Which lead to the following error
>
> What happens when you just get the package list:
>
> kiwi --info PATH_TO_CONFIG_DIR -select packages


Looks almost the same:


box:~ # kiwi --info /path/to/dir/with/config.xml --select packages
Aug-28 08:33:32 <1> : Reading image description [ListXMLInfo]...
Aug-28 08:33:32 <1> : Setting up SaT solver...
Aug-28 08:33:32 <1> : --> Using libsolv binding
Aug-28 08:33:32 <1> : --> Loading
http://.../opensuse/live/distribution/13.1/repo/non-oss/...
done
Aug-28 08:33:32 <1> : --> Loading http://.../opensuse/live/distribution/13.1/redoness/...
Aug-28 08:33:33 <1> : --> Loading http://.../opensuse/live/update/13.1/... done
Aug-28 08:33:36 <2> : --> Failed to queue job: netcat
skipped
Aug-28 08:33:36 <3> : SaT solver failed jobs found !
Aug-28 08:33:36 <1> : No packages/patterns solved
Aug-28 08:33:36 <1> : Closing session with ecode: 1
Aug-28 08:33:36 <3> : KIWI exited with error(s)


If I do the same as previously (change the name) the above command works fine.


Regards -- Till


PS: I don't mind being CC'ed directly as I don't have a Google Groups account. :-)
Reply all
Reply to author
Forward
0 new messages