openSUSE / zypper

World's most powerful command line package manager
http://en.opensuse.org/Portal:Zypper
Other
403 stars 110 forks source link

Inconsistent expected behaviour of zypper in within docker build #479

Closed Mr-Ao-Dragon closed 1 year ago

Mr-Ao-Dragon commented 1 year ago

Hello esteemed openSUSE development team, I'm trying to use hub.docker.com/openSUSE/tumbleweed and found that the direct read of the https rpm inside the container does not give the expected result.

This is the detailed error message.

This is the expected result. sh-5.2# zypper --no-gpg-checks --non-interactive in curl -sX GET "https://api.azul.com/metadata/v1/zulu/packages/?java_version=8&os=linux&arch=x64&archive_type=rpm&java_package_type=jre&support_term=lts&latest=true&availability_types=CA&certifications=tck&page=1&page_size=100" -H "accept: application/json" | jq '.[] | .download_url' |sed 's/\"//g' Loading repository data... Reading installed packages... 'zre-8 = 0:8.68.0.21-1' is already installed. No update candidate for 'zre-8-8.68.0.21-1.x86_64'. The highest available version is already installed. Resolving package dependencies... Nothing to do.

mlandres commented 1 year ago

I'm sorry, but I'm not sure whether this is an issue for zypper.

Apparently the curl command you use to compute the argument for zypper returns different data. In your expected result it leads to zre-8 = 0:8.68.0.21-1 and inside the docker build to _tmpRPMcache_:zre-8=0:8.68.0.21-1.

One would need to check first, if the curl command resolves to the same argument inside and outside the docker build.

If it does, or if the difference does not explain the issue, we'd need a zypper.log of the install command inside the docker build. You can create it by calling e.g. ZYPP_LOGFILE=/tmp/zypper.log zypper --no-gpg-checks --non-interactive in ..... And you need to get the file you of the build environment somehow. In case of doubt you can RUN cat /tmp/zypper.log, so it's visible in the containers build log (but beware, it's big).

Vogtinator commented 1 year ago

This is https://bugzilla.opensuse.org/show_bug.cgi?id=1195633. Install findutils as workaround.

mlandres commented 1 year ago

I'll check with Michael why the Requires: gzip bzip2 coreutils findutils was removed from libsolv-tools. Does not seem to be right.

mlandres commented 1 year ago

Closing the issue here. Will be resolved in bsc#1195633.

Mr-Ao-Dragon commented 1 year ago

tks!