Output the error string when renaming a dependency file fails. This has

happened to me when I had a misnamed directory in the pkgdb directory.
This commit is contained in:
rillig 2005-05-10 00:06:57 +00:00
parent 4d515665c5
commit 360e66cfd6

View File

@ -1,11 +1,11 @@
/* $NetBSD: perform.c,v 1.55 2005/05/07 15:09:41 wiz Exp $ */
/* $NetBSD: perform.c,v 1.56 2005/05/10 00:06:57 rillig Exp $ */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.15 1997/10/13 15:03:52 jkh Exp";
#else
__RCSID("$NetBSD: perform.c,v 1.55 2005/05/07 15:09:41 wiz Exp $");
__RCSID("$NetBSD: perform.c,v 1.56 2005/05/10 00:06:57 rillig Exp $");
#endif
#endif
@ -157,7 +157,7 @@ undepend(const char *deppkgname, void *vp)
return 0;
}
if (rename(ftmp, fname) == -1)
warnx("error renaming `%s' to `%s'", ftmp, fname);
warn("error renaming `%s' to `%s'", ftmp, fname);
remove(ftmp); /* just in case */
return 0;