mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-13 09:56:18 +02:00
Compare commits
1 Commits
5822285bb7
...
github/for
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6b7792202f |
@@ -31,7 +31,6 @@ usage() {
|
|||||||
echo ' -M <file> Location of a makepkg config file'
|
echo ' -M <file> Location of a makepkg config file'
|
||||||
echo ' -c <dir> Set pacman cache'
|
echo ' -c <dir> Set pacman cache'
|
||||||
echo ' -f <file> Copy file from the host to the chroot'
|
echo ' -f <file> Copy file from the host to the chroot'
|
||||||
echo ' -s Do not run setarch'
|
|
||||||
echo ' -h This message'
|
echo ' -h This message'
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
@@ -42,7 +41,6 @@ while getopts 'hC:M:c:f:s' arg; do
|
|||||||
M) makepkg_conf="$OPTARG" ;;
|
M) makepkg_conf="$OPTARG" ;;
|
||||||
c) cache_dirs+=("$OPTARG") ;;
|
c) cache_dirs+=("$OPTARG") ;;
|
||||||
f) files+=("$OPTARG") ;;
|
f) files+=("$OPTARG") ;;
|
||||||
s) nosetarch=1 ;;
|
|
||||||
h|?) usage ;;
|
h|?) usage ;;
|
||||||
*) error "invalid argument '%s'" "$arg"; usage ;;
|
*) error "invalid argument '%s'" "$arg"; usage ;;
|
||||||
esac
|
esac
|
||||||
@@ -124,8 +122,7 @@ fi
|
|||||||
copy_hostconf
|
copy_hostconf
|
||||||
|
|
||||||
eval "$(grep -a '^CARCH=' "$working_dir/etc/makepkg.conf")"
|
eval "$(grep -a '^CARCH=' "$working_dir/etc/makepkg.conf")"
|
||||||
|
setarch --list | grep -qx "$CARCH" || unset CARCH
|
||||||
[[ -z $nosetarch ]] || unset CARCH
|
|
||||||
|
|
||||||
exec ${CARCH:+setarch "$CARCH"} systemd-nspawn -q \
|
exec ${CARCH:+setarch "$CARCH"} systemd-nspawn -q \
|
||||||
-D "$working_dir" \
|
-D "$working_dir" \
|
||||||
|
@@ -69,7 +69,10 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
|
|||||||
|
|
||||||
rm -rf --one-file-system "${chroots}/${repo}-${arch}"
|
rm -rf --one-file-system "${chroots}/${repo}-${arch}"
|
||||||
(umask 0022; mkdir -p "${chroots}/${repo}-${arch}")
|
(umask 0022; mkdir -p "${chroots}/${repo}-${arch}")
|
||||||
setarch "${arch}" mkarchroot \
|
|
||||||
|
setarch --list | grep -qx "$arch" && setarch_cmd="setarch $arch"
|
||||||
|
|
||||||
|
${setarch_cmd} mkarchroot \
|
||||||
-C "${pacman_config}" \
|
-C "${pacman_config}" \
|
||||||
-M "${makepkg_config}" \
|
-M "${makepkg_config}" \
|
||||||
"${chroots}/${repo}-${arch}/root" \
|
"${chroots}/${repo}-${arch}/root" \
|
||||||
|
@@ -35,9 +35,6 @@ Options
|
|||||||
*-f* <file>::
|
*-f* <file>::
|
||||||
Copy file from the host to the chroot.
|
Copy file from the host to the chroot.
|
||||||
|
|
||||||
*-s*::
|
|
||||||
Do not run setarch.
|
|
||||||
|
|
||||||
*-h*::
|
*-h*::
|
||||||
Output command line options.
|
Output command line options.
|
||||||
|
|
||||||
|
@@ -31,7 +31,6 @@ usage() {
|
|||||||
echo ' -M <file> Location of a makepkg config file'
|
echo ' -M <file> Location of a makepkg config file'
|
||||||
echo ' -c <dir> Set pacman cache'
|
echo ' -c <dir> Set pacman cache'
|
||||||
echo ' -f <file> Copy file from the host to the chroot'
|
echo ' -f <file> Copy file from the host to the chroot'
|
||||||
echo ' -s Do not run setarch'
|
|
||||||
echo ' -h This message'
|
echo ' -h This message'
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
@@ -43,7 +42,6 @@ while getopts 'hUC:M:c:f:s' arg; do
|
|||||||
M) makepkg_conf="$OPTARG" ;;
|
M) makepkg_conf="$OPTARG" ;;
|
||||||
c) cache_dirs+=("$OPTARG") ;;
|
c) cache_dirs+=("$OPTARG") ;;
|
||||||
f) files+=("$OPTARG") ;;
|
f) files+=("$OPTARG") ;;
|
||||||
s) nosetarch=1 ;;
|
|
||||||
h|?) usage ;;
|
h|?) usage ;;
|
||||||
*) error "invalid argument '%s'" "$arg"; usage ;;
|
*) error "invalid argument '%s'" "$arg"; usage ;;
|
||||||
esac
|
esac
|
||||||
|
@@ -21,7 +21,6 @@ _arch_nspawn_args=(
|
|||||||
'-M[Location of a makepkg config file]:makepkg_config:_files -g "*.conf(.)"'
|
'-M[Location of a makepkg config file]:makepkg_config:_files -g "*.conf(.)"'
|
||||||
'-c[Set pacman cache]:pacman_cache:_files -/'
|
'-c[Set pacman cache]:pacman_cache:_files -/'
|
||||||
'-f[Copy file from the host to the chroot]:copy_file:_files'
|
'-f[Copy file from the host to the chroot]:copy_file:_files'
|
||||||
'-s[Do not run setarch]'
|
|
||||||
'-h[Display usage]'
|
'-h[Display usage]'
|
||||||
'1:chroot_dir:_files -/'
|
'1:chroot_dir:_files -/'
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user