Closed kseistrup closed 1 year ago
Thank you for the suggestion. Commit https://github.com/hirak99/yabsnap/commit/8043bac7b0d0964d65a76cfbaf02bb75e86e9a90 should resolve this.
Also 'lsb-release'
was added to makedepends()
in PKGBUILD.
Ahh unfortunately this wouldn't work for Arch derived distros, such as Manjaro or EndeavourOS.
Perhaps checking for disrtro is misguided; all we want is pacman to be present. I'll change this to just look for /usr/bin/pacman
.
Ahh unfortunately this wouldn't work for Arch derived distros, such as Manjaro or EndeavourOS.
What do those distros have in /etc/lsb-release
? Wouldn't something like
case "$(lsb_realease -si)" in
Arch | Manjaro | EndeavourOS )
: # we're good, just drop through the case statement
;;
* )
echo 'Not an ArchLinux based distro' >&2
exit 1
;;
esac
work?
Yes that should also work.
But I realized what I really wanted to check - via the distribution - was whether the distro supports the libalpm hook. Checking for existence of pacman feels like a more direct way to do that.
I can see that the
install-to-dest.sh
script is grepping forArch Linux
in the file/etc/issue
. I think that's a very fragile way of doing it since the system administrator may modify that file at any time (seeissue(5)
for details).Instead, make
yabsnap
depend on thelsb-release
package and make sure (1) that/etc/lsb-release
exists, and (2) that$DISTRIB_ID
equalsArch
. Perhaps something along these lines: