Skip to content

Commit

Permalink
distro/installer/centos: install with --allowerasing for centos 8 and…
Browse files Browse the repository at this point in the history
… above

~# lkp install mdadm-selftests-1HDD-02.yaml
Use: distro/installer/centos install binutils bzip2 curl fakeroot gettext gnupg libarchive bsdtar ncurses openssl
Last metadata expiration check: 0:00:07 ago on Mon Feb  3 06:21:16 2025.
Package binutils-2.35.2-59.el9.x86_64 is already installed.
Package bzip2-1.0.8-10.el9.x86_64 is already installed.
Package fakeroot-1.36-1.el9.x86_64 is already installed.
Package gettext-0.21-8.el9.x86_64 is already installed.
Package gnupg2-2.3.3-4.el9.x86_64 is already installed.
Package libarchive-3.5.3-4.el9.x86_64 is already installed.
Package bsdtar-3.5.3-4.el9.x86_64 is already installed.
Package ncurses-6.2-10.20210508.el9.x86_64 is already installed.
Package openssl-1:3.2.2-6.el9.x86_64 is already installed.
Error:
 Problem: problem with installed package curl-minimal-7.76.1-31.el9.x86_64
  - package curl-minimal-7.76.1-31.el9.x86_64 from @System conflicts with curl provided by curl-7.76.1-31.el9.x86_64 from baseos
  - package curl-minimal-7.76.1-23.el9.x86_64 from baseos conflicts with curl provided by curl-7.76.1-31.el9.x86_64 from baseos
  - package curl-minimal-7.76.1-26.el9.x86_64 from baseos conflicts with curl provided by curl-7.76.1-31.el9.x86_64 from baseos
  - package curl-minimal-7.76.1-28.el9.x86_64 from baseos conflicts with curl provided by curl-7.76.1-31.el9.x86_64 from baseos
  - package curl-minimal-7.76.1-29.el9.x86_64 from baseos conflicts with curl provided by curl-7.76.1-31.el9.x86_64 from baseos
  - package curl-minimal-7.76.1-31.el9.x86_64 from baseos conflicts with curl provided by curl-7.76.1-31.el9.x86_64 from baseos
  - cannot install the best candidate for the job
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Cannot install some packages of makepkg depends

Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
rli9 committed Feb 3, 2025
1 parent 0ba4654 commit e231908
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 1 addition & 4 deletions distro/centos
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,7 @@ pack_benchmark()

download()
{
# use --allowerasing to resolve issue on centos 9
# Problem: problem with installed package libcurl-minimal-7.76.1-31.el9.x86_64
# - package libcurl-minimal-7.76.1-31.el9.x86_64 from @System conflicts with libcurl(x86-64) provided by libcurl-7.76.1-31.el9.x86_64 from baseos
$LKP_SRC/distro/installer/$DISTRO --allowerasing --downloadonly $*
$LKP_SRC/distro/installer/$DISTRO --downloadonly $*
}

pack()
Expand Down
7 changes: 6 additions & 1 deletion distro/installer/centos
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ detect_system

if (( $_system_version >= 8 )); then
package_manager=dnf

# use --allowerasing to resolve issue on centos 9
# Problem: problem with installed package libcurl-minimal-7.76.1-31.el9.x86_64
# - package libcurl-minimal-7.76.1-31.el9.x86_64 from @System conflicts with libcurl(x86-64) provided by libcurl-7.76.1-31.el9.x86_64 from baseos
extra_option="--allowerasing"
else
package_manager=yum
fi
Expand All @@ -13,4 +18,4 @@ if ! rpm -q epel-release >/dev/null; then
${package_manager} makecache fast
fi

${package_manager} install -y $*
${package_manager} install -y "$extra_option" $*
1 change: 0 additions & 1 deletion tools/test-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ fi
packages=$(map_packages)

[[ "$distro" =~ (debian|ubuntu) ]] && extra_option="--dry-run"
[[ "$distro" =~ (centos) ]] && extra_option="--allowerasing"

echo "$LKP_SRC/distro/installer/$distro $extra_option" 1>&2
$LKP_SRC/distro/installer/$distro $extra_option $packages

0 comments on commit e231908

Please sign in to comment.