pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/pkg_install-renovation]: pkgsrc/pkgtools/pkg_install/files/lib If the...
details: https://anonhg.NetBSD.org/pkgsrc/rev/dd816f683cb5
branches: pkg_install-renovation
changeset: 541599:dd816f683cb5
user: joerg <joerg%pkgsrc.org@localhost>
date: Mon Aug 25 18:43:04 2008 +0000
description:
If the file removal fails for e.g. due to checksum mismatch, still
update the pkgdb. This restores the expectation of installing a package
over it working fine.
diffstat:
pkgtools/pkg_install/files/lib/plist.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (62 lines):
diff -r 2ae6c0c35986 -r dd816f683cb5 pkgtools/pkg_install/files/lib/plist.c
--- a/pkgtools/pkg_install/files/lib/plist.c Mon Aug 25 18:31:14 2008 +0000
+++ b/pkgtools/pkg_install/files/lib/plist.c Mon Aug 25 18:43:04 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: plist.c,v 1.17.4.11 2008/08/25 18:31:14 joerg Exp $ */
+/* $NetBSD: plist.c,v 1.17.4.12 2008/08/25 18:43:04 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -11,7 +11,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: plist.c,v 1.24 1997/10/08 07:48:15 charnier Exp";
#else
-__RCSID("$NetBSD: plist.c,v 1.17.4.11 2008/08/25 18:31:14 joerg Exp $");
+__RCSID("$NetBSD: plist.c,v 1.17.4.12 2008/08/25 18:43:04 joerg Exp $");
#endif
#endif
@@ -574,7 +574,7 @@
Force ? "deleting anyway" : "not deleting", tmp);
if (!Force) {
fail = FAIL;
- continue;
+ goto pkgdb_cleanup;
}
}
}
@@ -587,7 +587,7 @@
if ((cc = readlink(tmp, &buf[SymlinkHeaderLen],
sizeof(buf) - SymlinkHeaderLen - 1)) < 0) {
warn("can't readlink `%s'", tmp);
- continue;
+ goto pkgdb_cleanup;
}
buf[SymlinkHeaderLen + cc] = 0x0;
if (strcmp(buf, p->next->name) != 0) {
@@ -597,7 +597,7 @@
buf, Force ? "deleting anyway" : "not deleting", tmp);
if (!Force) {
fail = FAIL;
- continue;
+ goto pkgdb_cleanup;
}
}
buf[SymlinkHeaderLen + cc] = 0x0;
@@ -606,7 +606,7 @@
buf, Force ? "deleting anyway" : "not deleting", tmp);
if (!Force) {
fail = FAIL;
- continue;
+ goto pkgdb_cleanup;
}
}
}
@@ -632,6 +632,7 @@
}
}
+pkgdb_cleanup:
if (!Fake) {
if (!restored) {
errno = 0;
Home |
Main Index |
Thread Index |
Old Index