Skip to content

Commit

Permalink
github/workflows: Move auto-detection post apt-update
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Apr 30, 2024
1 parent 63c9eb2 commit 3ab5a1c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
#!/bin/sh

# handle package transitions across Ubuntu 20.04 and specific Ubuntu 22.04 arch packaging (e.g. i386)
libodbc_pkg=$(apt-cache --names-only search odbc | awk '{print $1}' | grep -oE "^(libodbc2|libodbcinst2|libodbc1|odbcinst1debian2)$")
[ -z "$libodbc_pkg" ] && libodbc_pkg=$(echo -e "libodbc2\nlibodbcinst2")

cat <<EOF
flex
bison
make
Expand All @@ -13,7 +6,6 @@ libsctp-dev
libradcli-dev
libhiredis-dev
odbcinst
$libodbc_pkg
unixodbc
unixodbc-dev
libconfuse-dev
Expand All @@ -39,4 +31,3 @@ uuid-dev
python-dev
libmaxminddb-dev
patch
EOF
9 changes: 9 additions & 0 deletions scripts/build/apt_requirements_postupdate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

# handle package naming transitions across Ubuntu 20.04 and specific Ubuntu 22.04 arch packaging (e.g. i386)
libodbc_pkg=$(apt-cache --names-only search odbc | awk '{print $1}' | grep -oE "^(libodbc2|libodbcinst2|libodbc1|odbcinst1debian2)$")
[ -z "$libodbc_pkg" ] && libodbc_pkg=$(echo -e "libodbc2\nlibodbcinst2")

cat <<EOF
$libodbc_pkg
EOF
4 changes: 3 additions & 1 deletion scripts/build/install_depends.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

. $(dirname $0)/dockerize.sub

PKGS=$(. "$(dirname $0)/apt_requirements.sh")
PKGS=$(cat "$(dirname $0)/apt_requirements.txt")

. $(dirname $0)/build.conf.sub

Expand All @@ -27,6 +27,8 @@ fi
${SUDO} apt-get update -y
${SUDO} apt-get -y remove libmemcached11 libpq5
${SUDO} apt-get -y autoremove

PKGS+=" $(. "$(dirname $0)/apt_requirements_postupdate.sh")"
${SUDO} apt-get -y --allow-downgrades install ${PKGS}

if [ ! -z "${POST_INSTALL_CMD}" ]
Expand Down

0 comments on commit 3ab5a1c

Please sign in to comment.