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 pkg_install-20080204:
details: https://anonhg.NetBSD.org/pkgsrc/rev/32e8f917d733
branches: trunk
changeset: 538274:32e8f917d733
user: joerg <joerg%pkgsrc.org@localhost>
date: Mon Feb 04 14:03:10 2008 +0000
description:
pkg_install-20080204:
Try to remove all +* files from the pkgdb first. If the log directory is
not empty afterwards, be noisy, but try rm -rf on it for the force case.
diffstat:
pkgtools/pkg_install/files/delete/perform.c | 31 +++++++++++++++-------------
pkgtools/pkg_install/files/lib/version.h | 4 +-
2 files changed, 19 insertions(+), 16 deletions(-)
diffs (70 lines):
diff -r c3cd45c70998 -r 32e8f917d733 pkgtools/pkg_install/files/delete/perform.c
--- a/pkgtools/pkg_install/files/delete/perform.c Mon Feb 04 13:51:53 2008 +0000
+++ b/pkgtools/pkg_install/files/delete/perform.c Mon Feb 04 14:03:10 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.21 2008/01/26 09:23:31 rillig Exp $ */
+/* $NetBSD: perform.c,v 1.22 2008/02/04 14:03:10 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -11,7 +11,7 @@
#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.21 2008/01/26 09:23:31 rillig Exp $");
+__RCSID("$NetBSD: perform.c,v 1.22 2008/02/04 14:03:10 joerg Exp $");
#endif
#endif
@@ -839,19 +839,22 @@
warnx("Oops - removed current working directory. Oh, well.");
if (!Fake) {
/* Finally nuke the +-files and the pkgdb-dir (/var/db/pkg/foo) */
- if (is_depoted_pkg) {
- (void) remove_files(LogDir, "+*");
- if (isemptydir(LogDir))
- (void)rmdir(LogDir);
- else
- warnx("%s is not empty", LogDir);
- return 0;
+ (void) remove_files(LogDir, "+*");
+ if (isemptydir(LogDir))
+ (void)rmdir(LogDir);
+ else if (is_depoted_pkg)
+ warnx("%s is not empty", LogDir);
+ else if (Force) {
+ if (fexec(REMOVE_CMD, "-rf", LogDir, NULL) != 0) {
+ warnx("couldn't remove log entry in %s", LogDir);
+ return 1;
+ } else {
+ warnx("log entry forcefully removed in %s", LogDir);
+ return 0;
+ }
} else {
- if (fexec(REMOVE_CMD, "-rf", LogDir, NULL)) {
- warnx("couldn't remove log entry in %s, deinstall failed", LogDir);
- if (!Force)
- return 1;
- }
+ warnx("couldn't remove log entry in %s", LogDir);
+ return 1;
}
}
return 0;
diff -r c3cd45c70998 -r 32e8f917d733 pkgtools/pkg_install/files/lib/version.h
--- a/pkgtools/pkg_install/files/lib/version.h Mon Feb 04 13:51:53 2008 +0000
+++ b/pkgtools/pkg_install/files/lib/version.h Mon Feb 04 14:03:10 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: version.h,v 1.89 2008/02/02 16:21:46 joerg Exp $ */
+/* $NetBSD: version.h,v 1.90 2008/02/04 14:03:10 joerg Exp $ */
/*
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
@@ -33,6 +33,6 @@
#ifndef _INST_LIB_VERSION_H_
#define _INST_LIB_VERSION_H_
-#define PKGTOOLS_VERSION "20080202"
+#define PKGTOOLS_VERSION "20080204"
#endif /* _INST_LIB_VERSION_H_ */
Home |
Main Index |
Thread Index |
Old Index