openSUSE / obs-build

OBS build script, can be used with OBS or stand alone
GNU General Public License v2.0
132 stars 183 forks source link

OBS fails to resolve correctly for zypper calls using exec form #926

Open SchoolGuy opened 1 year ago

SchoolGuy commented 1 year ago

Issue Description

Containers built with a Dockerfile and the exec-form for the RUN command don't have the packages asked for available. When switching to the shell form it works as expected.

Expected Result

The packages installed using the exec-form of zypper should be recognized and available during the build.

How to Reproduce

FROM opensuse/tumbleweed

# Works
RUN zypper in -n apache2

# Doesn't work
RUN ["zypper", "in", "-n", "python3-distro"]
  1. Use provided Dockerfile and build in OBS/IBS
  2. See error described above

Further Information

Project where this can be seen (revision 3): https://build.opensuse.org/package/show/home:cobbler-project:github-ci:release32/cobbler-docker-testing

SchoolGuy commented 1 year ago

In the meantime, I committed revision 4 which is building with (relative - only x86_64) success.

SchoolGuy commented 1 year ago

A little bird (@Vogtinator) told me that this is actually a bug in obs-build. Feel free to move the issue.

It seems to be an issue with the following script:

https://github.com/openSUSE/obs-build/blob/df01e0cd6c596186bd730faa6f92a8544e704277/Build/Docker.pm#L345-L367