diff --git a/base/test-apk.bats b/base/test-apk.bats index a1d3f42..4ae9b65 100755 --- a/base/test-apk.bats +++ b/base/test-apk.bats @@ -15,6 +15,14 @@ load 'assert' assert_output --partial "alpine-baselayout" } +@test "essentials" { + run xx-apk list xx-c-essentials + assert_success + + run xx-apk list xx-cxx-essentials + assert_success +} + @test "cross" { target="arm64" if [ "$(xx-info arch)" = "arm64" ]; then target="amd64"; fi diff --git a/base/test-apt.bats b/base/test-apt.bats index 997a9b3..4cde980 100755 --- a/base/test-apt.bats +++ b/base/test-apt.bats @@ -22,6 +22,14 @@ load 'assert' assert_line "Package: gcc" } +@test "essentials" { + run xx-apt show xx-c-essentials + assert_success + + run xx-apt show xx-cxx-essentials + assert_success +} + @test "amd64" { export TARGETARCH=amd64 if ! xx-info is-cross; then skip; fi diff --git a/base/xx-apt b/base/xx-apt index ad5e313..738f327 100755 --- a/base/xx-apt +++ b/base/xx-apt @@ -170,13 +170,13 @@ packages2= for p in ${packages}; do if [ "${p}" = "xx-c-essentials" ]; then p="libc6-dev" - if "$arg0" info "libgcc-10-dev:${XX_PKG_ARCH}" >/dev/null 2>/dev/null; then + if checkpkg "libgcc-10-dev:${XX_PKG_ARCH}" >/dev/null 2>/dev/null; then p="$p libgcc-10-dev" else p="$p libgcc-8-dev" fi elif [ "${p}" = "xx-cxx-essentials" ]; then - if "$arg0" info "libstdc++-10-dev:${XX_PKG_ARCH}" >/dev/null 2>/dev/null; then + if checkpkg "libstdc++-10-dev:${XX_PKG_ARCH}" >/dev/null 2>/dev/null; then p="libstdc++-10-dev" else p="libstdc++-8-dev"