mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-03-03 10:47:40 +00:00
abuild: add cmd:* providers for symlinks
This commit is contained in:
parent
520641dea7
commit
76e82bfb52
@ -1296,9 +1296,13 @@ prepare_command_provides() {
|
||||
options_has "!tracedeps" && return 0
|
||||
cd "$dir" || return 1
|
||||
for i in bin/* sbin/* usr/bin/* usr/sbin/*; do
|
||||
# We can't check symlinks properly with absolute paths,
|
||||
# subpackages and dependencies so assume that they are commands
|
||||
if ! [ -L "$i" ]; then
|
||||
if ! [ -x "$i" ] || ! [ -f "$i" ]; then
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
# exclude any provides: lines for commands that has '@' because '@'
|
||||
# is used as seperator between command name and repository. This
|
||||
# avoids potential conflicts
|
||||
|
@ -1058,6 +1058,7 @@ abuild_command_provides_body() {
|
||||
chmod +x "\$pkgdir/usr/bin/foo"
|
||||
cp -a "\$pkgdir/usr/bin/foo" "\$pkgdir/usr/bin/foo@"
|
||||
mkdir -p "\$pkgdir/usr/bin/dir/"
|
||||
ln -s /bin/not-on-the-host-system-but-in-a-dependency "\$pkgdir/usr/bin/link"
|
||||
}
|
||||
EOF
|
||||
abuild rootpkg
|
||||
@ -1065,6 +1066,7 @@ abuild_command_provides_body() {
|
||||
atf_check \
|
||||
-o match:"provides = cmd:foo=1.0-r0" \
|
||||
-o not-match:"provides = cmd:foo@=1.0-r0" \
|
||||
-o match:"provides = cmd:link=1.0-r0" \
|
||||
-o not-match:"provides = cmd:dir=1.0-r0" \
|
||||
grep '^provides = ' pkg/.control.testprovides/.PKGINFO
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user