Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some nspawn subshells ignore errors #113

Open
kpcyrd opened this issue Jun 11, 2022 · 0 comments
Open

Some nspawn subshells ignore errors #113

kpcyrd opened this issue Jun 11, 2022 · 0 comments

Comments

@kpcyrd
Copy link
Member

kpcyrd commented Jun 11, 2022

I noticed this error:

(13/21) Warn about old perl modules
(14/21) Updating fontconfig cache...
(15/21) Probing GDK-Pixbuf loader modules...
(16/21) Updating GIO module cache...
(17/21) Compiling GSettings XML schema files...
(18/21) Probing GTK3 input method modules...
(19/21) Updating icon theme caches...
(20/21) Updating the info directory file...
(21/21) Updating the desktop file MIME type cache...
Installing devtools from https://archive.archlinux.org/packages/d/devtools-20220207-2-any.pkg.tar.zst
:: Retrieving packages...
 devtools-20220207-2-any.pkg.tar.zst failed to download
error: failed retrieving file 'devtools-20220207-2-any.pkg.tar.zst' from archive.archlinux.org : Connection timeout after 10000 ms
warning: failed to retrieve some files
cp: cannot stat '/usr/share/devtools/makepkg-x86_64.conf': No such file or directory
%

The rebuild failing due to the connection timeout is expected, but it seems the error was ignored and the script continued running (attempting to copy a file).

This is because the code is running in a nspawn subshell that doesn't use -x:

archlinux-repro/repro.in

Lines 481 to 502 in 7768f33

# shellcheck disable=SC2086
EPHEMERAL=1 exec_nspawn root \
--bind="${build_root_dir}:/mnt" \
--bind-ro="$KEYRINGCACHE/$keyring_package:/gnupg" \
--bind="$(readlink -e ${cachedir}):/var/cache/pacman/pkg" \
--bind="$(readlink -e ${cachedir}):/cache" \
bash -bash "${packages[@]}" <<-__END__
rm --recursive /etc/pacman.d/gnupg/
cp --target-directory=/etc/pacman.d/ --recursive /gnupg
echo "faked-system-time ${SOURCE_DATE_EPOCH}" >> /etc/pacman.d/gnupg/gpg.conf
pacstrap -G -U /mnt --needed "\$@"
echo "Installing devtools from $DEVTOOLS_PKG"
# Ignore all dependencies since we only want the file
# Saves us a few seconds and doesn't download a bunch of things
# we are getting rid off
if [[ "$DEVTOOLS_PKG" == https* ]]; then
pacman --noconfirm --needed -Udd "$DEVTOOLS_PKG"
else
pacman --noconfirm --needed -Sddu "$DEVTOOLS_PKG"
fi
cp -v /usr/share/devtools/makepkg-x86_64.conf /mnt/etc/makepkg.conf
__END__

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant