Subject: Re: #define name for non-root pkg_install tools
To: None <>
From: Jonathan Perkin <>
List: tech-pkg
Date: 03/30/2004 13:04:13
* On 2004-03-29 at 18:22 BST, Todd Vierling wrote:

> The diff follows.  Of course, I'd like to choose a different name
> for the symbol and put it into pkgtools/pkg_install/Makefile,
> rather than potting an OS-specific symbol there.  Is there a
> preferred naming convention here?  I was thinking
> "PKG_INSTALL_AS_NONROOT", but that sounds clunky.

Well, personally I use:

   #ifndef __INTERIX
   	if (!Fake && getuid() != 0) {
   		warnx("not running as root - trying to delete anyways");

so it's not that clunky by me :)  I'd love to see the warnx's
removed when built with "./bootstrap --ignore-user-check ...",
or even removed completely given the shift of target user base
recently and the proliferation of local unprivileged installs.


Jonathan Perkin                         <>
BBC Internet Services