Sebastian Meyer
2018-Aug-23 14:45 UTC
[Libguestfs] [PATCH] Fix error with --uninstall option on SUSE
The `-l` option for some `zypper` subcommands is short for `--auto-agree-with-licenses` and not available on the `zypper rm` command. --- customize/customize_run.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customize/customize_run.ml b/customize/customize_run.ml index f92e9a199..3eacdaca0 100644 --- a/customize/customize_run.ml +++ b/customize/customize_run.ml @@ -181,7 +181,7 @@ exec >>%s 2>&1 | "urpmi" -> sprintf "urpme %s" quoted_args | "xbps" -> sprintf "xbps-remove -Sy %s" quoted_args | "yum" -> sprintf "yum -y remove %s" quoted_args - | "zypper" -> sprintf "zypper -n rm -l %s" quoted_args + | "zypper" -> sprintf "zypper -n rm %s" quoted_args | "unknown" -> error_unknown_package_manager (s_"--uninstall") --
Pino Toscano
2018-Aug-23 15:21 UTC
Re: [Libguestfs] [PATCH] Fix error with --uninstall option on SUSE
Hi Sebastian, On Thursday, 23 August 2018 16:45:27 CEST Sebastian Meyer wrote:> The `-l` option for some `zypper` subcommands is short for > `--auto-agree-with-licenses` and not available on the `zypper rm` command. >No problem with the patch, just one question: can it happen that zypper may decide to install packages when removing others, e.g. to keep some other dependency/relationship satisfied? For example: 1) package PkgA depends on PkgB | PkgC 2) when installing PkgA, PkgB is installed 3) you try to remove PkgB, and zypper decides to install PkgC to keep PkgA installed Of course the example above is overly simplified -- though, can the above happen? Thanks, -- Pino Toscano
Sebastian Meyer
2018-Aug-23 15:44 UTC
Re: [Libguestfs] [PATCH] Fix error with --uninstall option on SUSE
Hi Pino, On 23.08.2018 17:21, Pino Toscano wrote:> No problem with the patch, just one question: can it happen that zypper > may decide to install packages when removing others, e.g. to keep some > other dependency/relationship satisfied? > > [...] > Of course the example above is overly simplified -- though, > can the above happen? >I don't think so. If I remove bash for example, it just removes it along with everything that depends on bash. There are some cases where it provides multiple solutions, but in those it just chooses 'cancel' when -n/--non-interactive is set. Regards, -- Sebastian Meyer
Sebastian Meyer
2018-Aug-23 15:46 UTC
Re: [Libguestfs] [PATCH] Fix error with --uninstall option on SUSE
Hi Pino, On 23.08.2018 17:21, Pino Toscano wrote:> No problem with the patch, just one question: can it happen that zypper > may decide to install packages when removing others, e.g. to keep some > other dependency/relationship satisfied? > > [...] > Of course the example above is overly simplified -- though, > can the above happen? >I don't think so. If I remove bash for example, it just removes it along with everything that depends on bash. There are some cases where it provides multiple solutions, but in those it just chooses 'cancel' and returns 4 when -n/--non-interactive is set. Regards, -- Sebastian Meyer
Possibly Parallel Threads
- [PATCH] Fix error with --uninstall option on SUSE
- Re: [PATCH] Fix error with --uninstall option on SUSE
- Re: [PATCH] Mask some package names if appliance is build for SUSE
- Re: [PATCH 2/2] customize: Improve the error messages when package manager is unknown or unsupported.
- [PATCH] customize: Add --uninstall operation.