You are not logged in.
PKGBUILD:
...
package() {
env -i \
PLATFORMS='aarch64 arm microblaze' \
PLNXCHECKSUM='ab14d397770da66f07e16728ca0ee208' \
PLNXINSTALLDIR="$pkgdir/opt/$pkgname" \
PLNXINSTALLLER="$_plnxinstaller" \
./petalinux-install
...After packaging, many symlinks like `$pkgdir/opt/$pkgname/XXX` are created. I must change them to `/opt/$pkgname/XXX` to make they can work. Anyone know shell commands to detect all incorrect symlinks and fix them? TIA!
Last edited by Freed (2023-06-05 12:09:18)
An adherent of hacker culture and open source.
Offline
grep -rlFa "$pkgdir" "$pkgdir" | xargs sed -i "s!$pkgdir!!g"
find "$pkgdir" -type l -lname "$pkgdir/*" -exec sh -c 'ln -sf $(readlink -f "{}" | sed "s|'"$pkgdir"'||") {}' \;Last edited by Freed (2023-06-05 13:26:43)
An adherent of hacker culture and open source.
Offline