summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2007-09-07 15:45:14 +0000
committerrillig <rillig@pkgsrc.org>2007-09-07 15:45:14 +0000
commit7f589f235139d5c6025ffb077f7acc17e0e15b97 (patch)
treeb8801f6e67619a0d13849290fe8038ababc8694a /pkgtools
parent7ea33599c0beb6e50b71a6f3fa4d583487cba97f (diff)
downloadpkgsrc-7f589f235139d5c6025ffb077f7acc17e0e15b97.tar.gz
In unprivileged builds, the user running pkg_add and pkg_delete is
almost always an unprivileged user. So there's no point in printing a warning in that case.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_install/files/add/perform.c6
-rw-r--r--pkgtools/pkg_install/files/delete/main.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/pkgtools/pkg_install/files/add/perform.c b/pkgtools/pkg_install/files/add/perform.c
index 87a001f2f93..24538a38dbe 100644
--- a/pkgtools/pkg_install/files/add/perform.c
+++ b/pkgtools/pkg_install/files/add/perform.c
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.59 2007/08/15 01:21:46 joerg Exp $ */
+/* $NetBSD: perform.c,v 1.60 2007/09/07 15:45:14 rillig Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -14,7 +14,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
#else
-__RCSID("$NetBSD: perform.c,v 1.59 2007/08/15 01:21:46 joerg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.60 2007/09/07 15:45:14 rillig Exp $");
#endif
#endif
@@ -855,7 +855,7 @@ pkg_do(const char *pkg, lpkg_head_t *pkgs)
if (!NoRecord && !Fake) {
char contents[MaxPathSize];
-#ifndef __INTERIX
+#if !defined(__INTERIX) && !defined(UNPRIVILEGED)
if (getuid() != 0)
warnx("not running as root - trying to record install anyway");
#endif
diff --git a/pkgtools/pkg_install/files/delete/main.c b/pkgtools/pkg_install/files/delete/main.c
index 0b9eb04906d..2b70a81ee53 100644
--- a/pkgtools/pkg_install/files/delete/main.c
+++ b/pkgtools/pkg_install/files/delete/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.19 2007/08/15 01:49:02 joerg Exp $ */
+/* $NetBSD: main.c,v 1.20 2007/09/07 15:45:15 rillig Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -11,7 +11,7 @@
#if 0
static char *rcsid = "from FreeBSD Id: main.c,v 1.11 1997/10/08 07:46:48 charnier Exp";
#else
-__RCSID("$NetBSD: main.c,v 1.19 2007/08/15 01:49:02 joerg Exp $");
+__RCSID("$NetBSD: main.c,v 1.20 2007/09/07 15:45:15 rillig Exp $");
#endif
#endif
@@ -190,7 +190,7 @@ main(int argc, char **argv)
warnx("missing package name(s)");
usage();
}
-#ifndef __INTERIX
+#if !defined(__INTERIX) && !defined(UNPRIVILEGED)
if (!Fake && Verbose && getuid() != 0) {
warnx("not running as root - trying to delete anyways");
}