pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc Removed the warning about pkg_add or pkg_delete "not r...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/461af645c3ae
branches:  trunk
changeset: 533100:461af645c3ae
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat Sep 08 09:58:14 2007 +0000

description:
Removed the warning about pkg_add or pkg_delete "not running as root"
completely. It only made the code more bloated, and a user trying to add
or delete packages would get lots of "Permission denied" warnings
anyway.

diffstat:

 bootstrap/bootstrap                      |   6 +-----
 pkgtools/pkg_install/files/add/perform.c |   8 ++------
 pkgtools/pkg_install/files/delete/main.c |  10 +++-------
 3 files changed, 6 insertions(+), 18 deletions(-)

diffs (82 lines):

diff -r ba56c7fa7735 -r 461af645c3ae bootstrap/bootstrap
--- a/bootstrap/bootstrap       Sat Sep 08 09:45:22 2007 +0000
+++ b/bootstrap/bootstrap       Sat Sep 08 09:58:14 2007 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: bootstrap,v 1.111 2007/09/07 15:45:14 rillig Exp $
+# $NetBSD: bootstrap,v 1.112 2007/09/08 09:58:14 rillig Exp $
 #
 #
 # Copyright (c) 2001-2002 Alistair G. Crooks.  All rights reserved.
@@ -790,10 +790,6 @@
        need_extras=yes
 fi
 
-if [ "$ignoreusercheck" = "yes" ]; then
-       echo "CPPFLAGS+=                        -DUNPRIVILEGED" >> ${BOOTSTRAP_MKCONF}
-fi
-
 echo_msg "Bootstrapping mk-files"
 run_cmd "(cd ${pkgsrcdir}/pkgtools/bootstrap-mk-files/files && env CP=${cpprog} \
  OPSYS=${opsys} MK_DST=${wrkdir}/share/mk ROOT_GROUP=${root_group} \
diff -r ba56c7fa7735 -r 461af645c3ae pkgtools/pkg_install/files/add/perform.c
--- a/pkgtools/pkg_install/files/add/perform.c  Sat Sep 08 09:45:22 2007 +0000
+++ b/pkgtools/pkg_install/files/add/perform.c  Sat Sep 08 09:58:14 2007 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: perform.c,v 1.60 2007/09/07 15:45:14 rillig Exp $      */
+/*     $NetBSD: perform.c,v 1.61 2007/09/08 09:58: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.60 2007/09/07 15:45:14 rillig Exp $");
+__RCSID("$NetBSD: perform.c,v 1.61 2007/09/08 09:58:14 rillig Exp $");
 #endif
 #endif
 
@@ -855,10 +855,6 @@
        if (!NoRecord && !Fake) {
                char    contents[MaxPathSize];
 
-#if !defined(__INTERIX) && !defined(UNPRIVILEGED)
-               if (getuid() != 0)
-                       warnx("not running as root - trying to record install anyway");
-#endif
                if (!PkgName) {
                        warnx("no package name! can't record package, sorry");
                        errc = 1;
diff -r ba56c7fa7735 -r 461af645c3ae pkgtools/pkg_install/files/delete/main.c
--- a/pkgtools/pkg_install/files/delete/main.c  Sat Sep 08 09:45:22 2007 +0000
+++ b/pkgtools/pkg_install/files/delete/main.c  Sat Sep 08 09:58:14 2007 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.20 2007/09/07 15:45:15 rillig Exp $ */
+/*     $NetBSD: main.c,v 1.21 2007/09/08 09:58:14 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.20 2007/09/07 15:45:15 rillig Exp $");
+__RCSID("$NetBSD: main.c,v 1.21 2007/09/08 09:58:14 rillig Exp $");
 #endif
 #endif
 
@@ -190,11 +190,7 @@
                warnx("missing package name(s)");
                usage();
        }
-#if !defined(__INTERIX) && !defined(UNPRIVILEGED)
-       if (!Fake && Verbose && getuid() != 0) {
-               warnx("not running as root - trying to delete anyways");
-       }
-#endif
+
        if (OnlyDeleteFromPkgDB) {
                /* Only delete the given packages' files from pkgdb, do not
                 * touch the pkg itself. Used by "make reinstall" in



Home | Main Index | Thread Index | Old Index