apt_get_auto_install function to install packages then mark as auto

This commit is contained in:
Hans-Christoph Steiner 2018-06-26 12:09:24 +02:00
parent b3af073a08
commit 33ee16058f
3 changed files with 15 additions and 8 deletions

View File

@ -22,10 +22,7 @@ JOB_URL="$CI_PROJECT_URL/-/jobs/$CI_JOB_ID"
COMMIT_URL="$CI_PROJECT_URL/commit/$CI_COMMIT_SHA"
BRANCH_URL="$CI_PROJECT_URL/commits/$CI_COMMIT_REF_NAME"
depends="aptly gnupg1"
$apt_get update
$apt_get install --no-install-recommends $depends
apt-mark auto $depends
apt_get_auto_install aptly gnupg1
# build apt repo from freshly built .debs
aptly="aptly -gpg-provider=internal"

View File

@ -5,3 +5,16 @@ if [ -z "$CI" ]; then
fi
apt_get="apt-get -qy $APT_GET_OPTIONS"
function apt_get_auto_install() {
$apt_get update
$apt_get install $@ && apt-mark auto $@
}
# Local variables:
# mode: shell-script
# sh-basic-offset: 4
# sh-indent-comment: t
# indent-tabs-mode: nil
# End:
# ex: ts=4 sw=4 et filetype=bash

View File

@ -2,10 +2,7 @@
. /usr/share/gitlab-ci-common
depends="lintian"
$apt_get update
$apt_get install $depends
apt-mark auto $depends
apt_get_auto_install lintian
echo "performing general and experimental lintian checks"
su --shell /bin/sh nobody --command "lintian --color always -EviIL +pedantic ../*.changes" || true