Use sudo for system package updates (#431)
* Log user before update of packages * Add sudo to package updates * Don't fail on unset username/userid
This commit is contained in:
committed by
GitHub
parent
584eba5487
commit
6a0eec3776
@@ -96,9 +96,9 @@ for file in $CHANGES; do
|
||||
# Update system repositories whenever a detected system package is involved,
|
||||
# either as dependency or as the crate being tested.
|
||||
if grep -iq 'origin: system' <<< $solution; then
|
||||
echo UPDATING system repositories...
|
||||
type apt-get 2>/dev/null && apt-get update || true
|
||||
type pacman 2>/dev/null && pacman -Syy || true
|
||||
echo "UPDATING system repositories with sudo from user ${USERNAME:-unset} ($UID:-unset)..."
|
||||
type apt-get 2>/dev/null && sudo apt-get update || true
|
||||
type pacman 2>/dev/null && sudo pacman -Syy || true
|
||||
else
|
||||
echo No need to update system repositories
|
||||
fi
|
||||
@@ -152,7 +152,7 @@ for file in $CHANGES; do
|
||||
echo BUILD ENVIRONMENT
|
||||
alr printenv
|
||||
echo BUILDING CRATE
|
||||
alr -d -n build
|
||||
alr -d -n build
|
||||
echo LISTING EXECUTABLES of crate $milestone
|
||||
alr -d run --list
|
||||
cd ..
|
||||
|
||||
Reference in New Issue
Block a user