openSUSE / zypper

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

zypper-download: Handle unresolvable arguments as error #447

Closed danteu closed 2 years ago

danteu commented 2 years ago

This commit changes zypper-download such that it behaves more consistent to zypper-install when an argument can't be resolved.

When an argument provided to zypper-install can't be resolved to a package, it prints an error message and exits with ZYPPER_EXIT_INF_CAP_NOT_FOUND after trying to install the remaining packages. In contrast, when zypper-download fails to resolve a package name, it prints a warning, downloads the remaining packages and exits with ZYPPER_EXIT_OK. This behaviour is inconsistent and makes it unneccessarily difficult to determine, whether all requested packages have been downloaded by zypper-download, e.g., in automation scenarios.

With this change, zypper-download now returns ZYPPER_EXIT_INF_CAP_NOT_FOUND instead of ZYPPER_EXIT_OK if any argument could not be resolved to a package.

mlandres commented 2 years ago

Thanks.