xbps-checkvers: restore previous behaviour after 7a220b37db.
The '%n' pkgname fmt option still needs to be the sourcepkg for xbps-src to work with no additional changes. This restores previous behaviour, and uses binpkg's pkgname while checking for pkgdb/repo.
This commit is contained in:
@@ -468,7 +468,7 @@ subpkg_head() {
|
||||
atf_set "descr" "xbps-checkvers(1): test subpkgs"
|
||||
}
|
||||
subpkg_body() {
|
||||
mkdir -p some_repo pkg_A void-packages/srcpkgs/A
|
||||
mkdir -p repo pkg_A void-packages/srcpkgs/A
|
||||
touch pkg_A/file00
|
||||
cat > void-packages/srcpkgs/A/template <<EOF
|
||||
pkgname=A
|
||||
@@ -478,21 +478,21 @@ revision=1
|
||||
EOF
|
||||
ln -s A void-packages/srcpkgs/A-subpkg
|
||||
ln -s A void-packages/srcpkgs/B-subpkg
|
||||
cd some_repo
|
||||
cd repo
|
||||
xbps-create -A noarch -n A-subpkg-1.1_1 -s "A-subpkg pkg" ../pkg_A
|
||||
atf_check_equal $? 0
|
||||
xbps-rindex -d -a $PWD/*.xbps
|
||||
atf_check_equal $? 0
|
||||
cd ..
|
||||
out=$(xbps-checkvers -i -R $PWD/some_repo -D $PWD/void-packages -sm A-subpkg)
|
||||
out=$(xbps-checkvers -i -R $PWD/repo -D $PWD/void-packages -sm A-subpkg)
|
||||
atf_check_equal $? 0
|
||||
atf_check_equal "$out" "A-subpkg 1.1_1 1.0_1 A-subpkg $PWD/some_repo"
|
||||
atf_check_equal "$out" "A 1.1_1 1.0_1 A-subpkg $PWD/repo"
|
||||
|
||||
out=$(xbps-checkvers -i -R $PWD/some_repo -D $PWD/void-packages -sm B-subpkg)
|
||||
out=$(xbps-checkvers -i -R repo -D $PWD/void-packages -sm B-subpkg)
|
||||
atf_check_equal $? 0
|
||||
atf_check_equal "$out" "B-subpkg ? 1.0_1 B-subpkg ?"
|
||||
atf_check_equal "$out" "A ? 1.0_1 B-subpkg ?"
|
||||
|
||||
out=$(xbps-checkvers -i -R $PWD/some_repo -D $PWD/void-packages -sm A)
|
||||
out=$(xbps-checkvers -i -R repo -D $PWD/void-packages -sm A)
|
||||
atf_check_equal $? 0
|
||||
atf_check_equal "$out" "A ? 1.0_1 A ?"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user