-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[common-utils] - Bookworm - enabled nonFreePackages option for instal…
…ling manpages-posix, manpages-posix-dev packages (#834) * [common-utils] - Bookworm - enabled nonFreePackages option for installing manpages-posix, manpages-posix-dev packages (non-free) * change to correct the regular expression replacement with sed cmd * changes according to comments by Samruddhi * Changes acc. to comments as on 08/02 * Updated patch version based on comments
- Loading branch information
1 parent
d5ef6a7
commit 1592dd5
Showing
4 changed files
with
71 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Optional: Import test library | ||
source dev-container-features-test-lib | ||
|
||
FAILED=() | ||
echoStderr() | ||
{ | ||
echo "$@" 1>&2 | ||
} | ||
|
||
checkOSPackages() { | ||
LABEL=$1 | ||
shift | ||
echo -e "\n🧪 Testing $LABEL" | ||
if dpkg-query --show -f='${Package}: ${Version}\n' "$@"; then | ||
echo "✅ Passed!" | ||
return 0 | ||
else | ||
echoStderr "❌ $LABEL check failed." | ||
FAILED+=("$LABEL") | ||
return 1 | ||
fi | ||
} | ||
|
||
checkCommon() | ||
{ | ||
PACKAGE_LIST="manpages-posix \ | ||
manpages-posix-dev" | ||
|
||
checkOSPackages "Installation of manpages-posix and manpages-posix-dev (non-free)" ${PACKAGE_LIST} | ||
} | ||
|
||
# Check for manpages-posix, manpages-posix-dev non-free packages | ||
checkCommon | ||
|
||
# Definition specific tests | ||
. /etc/os-release | ||
check "non-root user" test "$(whoami)" = "devcontainer" | ||
check "distro" test "${VERSION_CODENAME}" = "bookworm" | ||
|
||
# Report result | ||
reportResults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters