Skip to content

Commit

Permalink
ccm: fix for DownloadUser = alpm
Browse files Browse the repository at this point in the history
If not defining CUSTOM_PACMAN_CONF, the default behavior is to
use the system /etc/pacman.conf which is problematic if
DownloadUser = alpm is defined causing breakage of creating the
buildroot so hack that out when CUSTOM_PACMAN_CONF is null.

Fixes #88
  • Loading branch information
graysky authored and graysky committed Sep 19, 2024
1 parent 0f5bf8f commit 8715a0f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = 2.228
VERSION = 2.229
PN = clean-chroot-manager

PREFIX ?= /usr
Expand Down
13 changes: 12 additions & 1 deletion common/clean-chroot-manager64.in
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,18 @@ create() {
fi

[[ -d "$CCACHE_DIR" ]] && pkgs+=('ccache')
[[ -f "$CUSTOM_PACMAN_CONF" ]] && insargs+=(-C "$CUSTOM_PACMAN_CONF")

if [[ -f "$CUSTOM_PACMAN_CONF" ]]; then
insargs+=(-C "$CUSTOM_PACMAN_CONF")
else
# with pacman 7.0.0 having a setting of 'DownloadUser = alpm' in /etc/pacman.conf
# will cause the creation of the chroot to break so this is a hacky fix
if [[ -f /etc/pacman.conf ]]; then
sed '/DownloadUser = alpm/d' </etc/pacman.conf >/tmp/ccm-temp-pac.conf
insargs+=(-C /tmp/ccm-temp-pac.conf)
fi
fi

if [[ -f "$CUSTOM_MAKEPKG_CONF" ]]; then
insargs+=(-M "$CUSTOM_MAKEPKG_CONF")
else
Expand Down

0 comments on commit 8715a0f

Please sign in to comment.