summaryrefslogtreecommitdiff
path: root/pkgtools/pkg_install
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2020-03-01 11:02:04 +0000
committerrillig <rillig@pkgsrc.org>2020-03-01 11:02:04 +0000
commit52e06e797a121b4a8eda2acb6eb28f699ea86e6f (patch)
tree7899a6c1b500343559931331233c718fa167b1d4 /pkgtools/pkg_install
parentaeefed2b2bad60d68667760d473d5b9b66fb0e85 (diff)
downloadpkgsrc-52e06e797a121b4a8eda2acb6eb28f699ea86e6f.tar.gz
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 (limited to 'pkgtools/pkg_install')
-rw-r--r--pkgtools/pkg_install/files/lib/plist.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgtools/pkg_install/files/lib/plist.c b/pkgtools/pkg_install/files/lib/plist.c
index 1ae5dcaff56..9cc9695c7ba 100644
--- a/pkgtools/pkg_install/files/lib/plist.c
+++ b/pkgtools/pkg_install/files/lib/plist.c
@@ -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 @@ delete_with_parents(const char *fname, Boolean ign_err, Boolean ign_nonempty)
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);