Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the dependency solver with KIWI doesn't work like zypper #7943

Open
JanZerebecki opened this issue Jul 19, 2019 · 1 comment
Open

the dependency solver with KIWI doesn't work like zypper #7943

JanZerebecki opened this issue Jul 19, 2019 · 1 comment
Labels
Backend Things regarding the OBS backend

Comments

@JanZerebecki
Copy link
Member

Issue Description

When using a KIWI file in OBS with dependencies there are two cases I noticed that don't work like they would with zypper.

When a package depends on foo and there is a package bar that provides foo and depends on a package that is not available, it may happen to select bar and fail to find a solution.

When a package depends on a file, the package that provides it is not selected so during installation of requirements the build fails.

In OSInside/kiwi#1142 (comment) @schaefi said:

You are completely right but we can't change this behavior in the kiwi project. The buildservice does the following before it calls kiwi:

  1. It takes the package list from the kiwi XML and runs its own satsolver based solver operation.
    This operation as you already found out does not take file provides into account as it would be the case if zypper would have done that resolver operation

  2. obs now takes the resolved list of packages and creates temporary repositories inside of the obs worker (usually a VM or bare metal) that was selected to build your image.

  3. obs now calls kiwi. The obs:// repotype used in the kiwi XML is resolved to point to that temporary created repos if the build happens in obs. That repos could now missing some packages and when kiwi calls zypper it will find out something is missing and the build fails

I'm afraid but a fix to this problem can only happen in the obs project and code, maybe you open an issue there and discuss this with the obs people ?

Does this also happen for RPMs / spec files and I just didn't notice?

Expected Result

Build doesn't fail in these cases.

How to Reproduce

Branch https://build.opensuse.org/package/show/openSUSE:Leap:15.1:Images/opensuse-leap-image and add a few required packages:

  <packages type="image">
    <package name="ca-certificates"/>
    <package name="ca-certificates-mozilla"/>
    <package name="coreutils"/>
    <package name="openSUSE-build-key"/>
    <package name="krb5"/>
    <package name="kubic-locale-archive"/>
    <package name="tar"/>
    <package name="gzip"/>
    <package name="which"/>
    <package name="unzip"/>
    <package name="python3"/>
    <package name="python3-devel"/>
    <package name="python3-virtualenv"/>
    <package name="ca-certificates"/>
    <package name="git-core"/>
    <package name="lsb-release"/>
    <package name="patch"/>
    <package name="sudo"/>
    <package name="tar"/>
    <package name="python3"/>
    <package name="python3-devel"/>
    <package name="python3-virtualenv"/>
    <package name="ca-certificates"/>
    <package name="git-core"/>
    <package name="lsb-release"/>
    <package name="patch"/>
    <package name="sudo"/>
    <package name="tar"/>
    <package name="apache2-mod_wsgi-python3"/>
    <package name="blas-devel"/>
    <package name="bzip2"/>
    <package name="cyrus-sasl-devel"/>
    <package name="gcc"/>
    <package name="gcc-c++"/>
    <package name="git"/>
    <package name="krb5-devel"/>
    <package name="lapack-devel"/>
    <package name="liberasurecode-devel"/>
    <package name="libffi-devel"/>
    <package name="libgcrypt-devel"/>
    <package name="libgcrypt20"/>
    <package name="libjpeg8-devel"/>
    <package name="libmariadb-devel"/>
    <package name="libvirt-devel"/>
    <package name="libxml2"/>
    <package name="libxml2-devel"/>
    <package name="libxslt-devel"/>
    <package name="libyaml-devel"/>
    <package name="libzip-devel"/>
    <package name="make"/>
    <package name="mozilla-nss-devel"/>
    <package name="openldap2-devel"/>
    <package name="pcre-devel"/>
    <package name="pkg-config"/>
    <package name="postgresql-devel"/>
    <package name="python3-devel"/>
    <package name="python3-testsuite"/>
    <package name="systemd-devel"/>
    <package name="zlib-devel"/>
    <package name="live-add-yast-repos"/>
  </packages>

This fails to even start the build as libvirt-devel pulls in libunbound-devel-mini which on purpose has a non-existing requirement. To fix this add: <package name="libunbound2"/>.

Then the build fails as something from the above requires ncurses-devel which requires /usr/bin/tack which somehow is not picked up as a dependency. To fix that add <package name="tack"/>.

Further Information

@hennevogel hennevogel added the Backend Things regarding the OBS backend label Jul 19, 2019
@dcermak
Copy link
Contributor

dcermak commented Oct 22, 2019

You should be able to work around this issue by adding the following to your prjconf:

Preinstall: tack
Prefer: libunbound2

That's of course not a proper solution and just hides the actual problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Things regarding the OBS backend
Projects
None yet
Development

No branches or pull requests

3 participants