Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,13 @@ function list_all_packages() {
}

#
# Read a package-list file and return listed packages in _RET_LIST.
# Read a new-line separated list from a file, removing extra whitespace
# and comments. Return items in _RET_LIST.
#
function read_package_list() {
function read_list() {
local file="$1"

local pkg
local item
local line

_RET_LIST=()
Expand All @@ -508,13 +509,26 @@ function read_package_list() {

while read -r line; do
# trim whitespace
pkg=$(echo "$line" | tr -d '[:space:]')
[[ -z "$pkg" ]] && continue
item=$(echo "$line" | tr -d '[:space:]')
[[ -z "$item" ]] && continue
# ignore comments
[[ ${pkg:0:1} == "#" ]] && continue
[[ ${item:0:1} == "#" ]] && continue
_RET_LIST+=("$item")
done <"$file" || die "Failed to read list: $file"
}

#
# Read a package-list file and return listed packages in _RET_LIST.
#
function read_package_list() {
local file="$1"

local pkg

logmust read_list "$file"
for pkg in "${_RET_LIST[@]}"; do
check_package_exists "$pkg"
_RET_LIST+=("$pkg")
done <"$file" || die "Failed to read package list: $file"
done
}

#
Expand Down
21 changes: 2 additions & 19 deletions packages/virtualization/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,8 @@ DEFAULT_PACKAGE_GIT_URL="https://gitlab.delphix.com/app/dlpx-app-gate.git"
PACKAGE_DEPENDENCIES="adoptopenjdk crypt-blowfish host-jdks misc-debs"

function prepare() {
logmust install_pkgs \
ant \
gcc \
libcairo2 \
libcurl4-openssl-dev \
libjbig0 \
libnss3-dev \
libnss3-dbg \
libnss3-tools \
libpam0g-dev \
libpixman-1-0 \
libssl-dev \
libtiff5 \
libxcb-render0 \
libxcb-shm0 \
python-jira \
python-requests \
rsync \
virtualenv
logmust read_list "$WORKDIR/repo/appliance/packaging/build-dependencies"
logmust install_pkgs "${_RET_LIST[@]}"

logmust install_pkgs \
"$DEPDIR"/adoptopenjdk/*.deb \
Expand Down