Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Apr 2010 10:55:11 +0000 (UTC)
From:      Florent Thoumie <flz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r206132 - head/usr.sbin/pkg_install/lib
Message-ID:  <201004031055.o33AtBI7065797@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: flz
Date: Sat Apr  3 10:55:11 2010
New Revision: 206132
URL: http://svn.freebsd.org/changeset/base/206132

Log:
  Fix pkg_delete, check if the file we're trying to delete is a
  symlink before complaining that it doesn't exist. Typical case
  would be a leftover library symlink that's left over after the
  actual library has been removed.
  
  Reported by:	tabthorpe

Modified:
  head/usr.sbin/pkg_install/lib/plist.c

Modified: head/usr.sbin/pkg_install/lib/plist.c
==============================================================================
--- head/usr.sbin/pkg_install/lib/plist.c	Sat Apr  3 10:07:10 2010	(r206131)
+++ head/usr.sbin/pkg_install/lib/plist.c	Sat Apr  3 10:55:11 2010	(r206132)
@@ -551,7 +551,7 @@ delete_hierarchy(const char *dir, Boolea
     char *cp1, *cp2;
 
     cp1 = cp2 = strdup(dir);
-    if (!fexists(dir)) {
+    if (!fexists(dir) && !issymlink(dir)) {
 	if (!ign_err)
 	    warnx("%s '%s' doesn't exist",
 		isdir(dir) ? "directory" : "file", dir);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004031055.o33AtBI7065797>