This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=f702cd3f116f5e118d70140f31188dc1bed7b548 commit f702cd3f116f5e118d70140f31188dc1bed7b548 (HEAD -> main) Author: Ian Jackson <[email protected]> AuthorDate: Wed Jul 6 18:44:21 2022 +0100 dpkg: Make -E also take into account the architecture Let --skip-same-version look at the architecture too, so it can be used for an idempotent cross-grade. [[email protected]: - Document behavior change in dpkg(1) man page. - Reword --help output to fit under 80 chars. ] Closes: #1014476 Signed-off-by: Guillem Jover <[email protected]> --- man/dpkg.pod | 8 ++++++-- src/main/archives.c | 2 +- src/main/main.c | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/man/dpkg.pod b/man/dpkg.pod index f09b7c0d1..9eadc2d71 100644 --- a/man/dpkg.pod +++ b/man/dpkg.pod @@ -879,8 +879,12 @@ be marked selected for deinstallation. =item B<-E>, B<--skip-same-version> -Don't install the package if the same version of the package is already -installed. +Don't install the package if the same version and architecture +of the package is already installed. + +Since dpkg 1.21.10, the architecture is also taken into account, +which makes it possible to cross-grade packages or install additional +co-installable instances with the same version, but different architecture. =item B<--pre-invoke=>I<command> diff --git a/src/main/archives.c b/src/main/archives.c index a9dd28429..e7ecd285d 100644 --- a/src/main/archives.c +++ b/src/main/archives.c @@ -1673,7 +1673,7 @@ wanttoinstall(struct pkginfo *pkg) return true; } else if (rc == 0) { /* Same version fully installed. */ - if (f_skipsame) { + if (f_skipsame && pkg->available.arch == pkg->installed.arch) { notice(_("version %.250s of %.250s already installed, skipping"), versiondescribe(&pkg->installed.version, vdew_nonambig), pkg_name(pkg, pnaw_nonambig)); diff --git a/src/main/main.c b/src/main/main.c index 9cba932aa..6b10773ae 100644 --- a/src/main/main.c +++ b/src/main/main.c @@ -147,7 +147,7 @@ usage(const struct cmdinfo *ci, const char *value) " --path-exclude=<pattern> Do not install paths which match a shell pattern.\n" " --path-include=<pattern> Re-include a pattern after a previous exclusion.\n" " -O|--selected-only Skip packages not selected for install/upgrade.\n" -" -E|--skip-same-version Skip packages whose same version is installed.\n" +" -E|--skip-same-version Skip packages with same installed version/arch.\n" " -G|--refuse-downgrade Skip packages with earlier version than installed.\n" " -B|--auto-deconfigure Install even if it would break some other package.\n" " --[no-]triggers Skip or force consequential trigger processing.\n" -- Dpkg.Org's dpkg

