From 681ef9dfcf6e57bdda767efed7e50ce8e9de0563 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 17 Jan 2022 16:17:25 +0100 Subject: [PATCH] tests: add test with invalid version of subpkgs' dependency Ref: https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10058 --- tests/abuild.bats | 5 +++++ tests/testrepo/test-pkgname/APKBUILD | 1 + 2 files changed, 6 insertions(+) diff --git a/tests/abuild.bats b/tests/abuild.bats index 66d91c0..151c7a9 100644 --- a/tests/abuild.bats +++ b/tests/abuild.bats @@ -236,3 +236,8 @@ teardown() { && ! TESTSUBNAME="-foo" $ABUILD sanitycheck } +@test "abuild: invalid subpkg's version" { + cd testrepo/test-pkgname + ! TESTDEPVER="1.0-0" $ABUILD all +} + diff --git a/tests/testrepo/test-pkgname/APKBUILD b/tests/testrepo/test-pkgname/APKBUILD index c54be2fc..369b5e5 100644 --- a/tests/testrepo/test-pkgname/APKBUILD +++ b/tests/testrepo/test-pkgname/APKBUILD @@ -28,5 +28,6 @@ package() { } _sub() { + depends="$pkgname=${TESTDEPVER-$pkgver-r$pkgrel}" mkdir -p "$subpkgdir" }