James Bromberger <james@rcpt.to> writes: > is being created on a Debian system. The reason is that I have a very small > set of diffs that I want applied to the package only for Debian, and hope > at some stage to feed these diffs upstream (things like file paths, etc). Why are these changes only applicable when on a Debian system? What about Progeny? Corel? SuSE? Orange Bone Linux? OpenBSD? SunOS? Cygwin? The correct way to to size up OSs and people is to check for capabilities, not names. For example, if you want to know whether /proc/loadavg is usable, try to open it. This test will then work on any Linux, and maybe other systems as well, and won't break when Linux 3.17 returns to the purity of using /proc only for processes. > > if test -f /etc/debian_version ; then > > AC_MSG_RESULT(yes) > > INSTALL="/usr/bin/install" > > AC_SUBST(INSTALL) [...] Why not check directly whether /usr/bin/install exists? This will then work on any OS that has it. > Is using /etc/debian_version the right thing to do, or is there a > better/more accurate way to determine this? Existence of > /usr/bin/dpkg? Existence of /var/lib/dpkg? Since /etc/debian_version is a conffile, a user may have removed it. My answer would be to check if "dpkg -s base-files" succeeds, but that's not 100 % either. Anyway, you shouldn't do that, see above. -- Robbe
Attachment:
signature.ng
Description: PGP signature