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

zypper exits with 0 when remote package is unavailable or timeouts #539

Open
aledabin opened this issue Mar 25, 2024 · 1 comment
Open

Comments

@aledabin
Copy link

Hi, when installing multiple packages and one of them is a remote package, if the remote package is unavailable or timeouts, the exit code is still 0.

To reproduce:

  1. optional: start a local listening port: nc -l 9000, the same behavior happens if nothing is listening
  2. install a valid package and a fake remote package (to simulate when it's possible to connect to a repository but no content is received):
[root@root ~]$ zypper  --no-refresh install --no-confirm --no-recommends --allow-unsigned-rpm  bash  http://localhost:9000/none.rpm
Problem retrieving the specified RPM file:
Timeout exceeded when accessing 'http://localhost:9000/none.rpm'.
Please check whether the file is accessible.
Problem with the RPM file specified as 'http://localhost:9000/none.rpm', skipping.
Loading repository data...
Reading installed packages...
'bash' is already installed.
No update candidate for 'bash-4.4-150400'. The highest available version is already installed.
Resolving package dependencies...
Nothing to do.
[root@root ~]$ echo $?
0

My assumption is the exit status should not be 0 as not all packages were installed.

If only a remote package is specified, it works as expected:

[root@root ~]$ zypper  --no-refresh install --no-confirm --no-recommends --allow-unsigned-rpm   http://localhost:9000/none.rpm
Problem retrieving the specified RPM file:
Timeout exceeded when accessing 'http://localhost:9000/none.rpm'.
Please check whether the file is accessible.
Problem with the RPM file specified as 'http://localhost:9000/none.rpm', skipping.
No valid arguments specified.
[root@root ~]$  echo $?
3

It fails immediately or timeouts after some minutes, and finish with exit code 3.

@Shane-Braswell
Copy link

Notice the same issue when packages are skipped but found locally. Expect an option to throw an error but that's not available.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants