pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install/files/lib pkgtools/pkg_install: a...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7389ac71502b
branches:  trunk
changeset: 412183:7389ac71502b
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Mar 01 11:02:04 2020 +0000

description:
pkgtools/pkg_install: add errno details when remove fails

Before, it wasn't clear why removing the file failed. It could be ENOENT
or EPERM or EBUSY, and these lead to different causes.

https://mail-index.netbsd.org/pkgsrc-users/2020/02/28/msg030552.html

diffstat:

 pkgtools/pkg_install/files/lib/plist.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r e03c8914a31b -r 7389ac71502b pkgtools/pkg_install/files/lib/plist.c
--- a/pkgtools/pkg_install/files/lib/plist.c    Sun Mar 01 10:44:14 2020 +0000
+++ b/pkgtools/pkg_install/files/lib/plist.c    Sun Mar 01 11:02:04 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: plist.c,v 1.29 2009/08/02 17:56:45 joerg Exp $ */
+/*     $NetBSD: plist.c,v 1.30 2020/03/01 11:02:04 rillig Exp $        */
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -7,7 +7,7 @@
 #if HAVE_SYS_CDEFS_H
 #include <sys/cdefs.h>
 #endif
-__RCSID("$NetBSD: plist.c,v 1.29 2009/08/02 17:56:45 joerg Exp $");
+__RCSID("$NetBSD: plist.c,v 1.30 2020/03/01 11:02:04 rillig Exp $");
 
 /*
  * FreeBSD install - a package for the installation and maintainance
@@ -697,7 +697,7 @@
 
        if (remove(fname)) {
                if (!ign_err && (!ign_nonempty || errno != ENOTEMPTY))
-                       warnx("Couldn't remove %s", fname);
+                       warn("Couldn't remove %s", fname);
                return 0;
        }
        cp = xstrdup(fname);



Home | Main Index | Thread Index | Old Index