Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/pkg_install Check the return code from the second i...



details:   https://anonhg.NetBSD.org/src/rev/e755bb444815
branches:  trunk
changeset: 524926:e755bb444815
user:      agc <agc%NetBSD.org@localhost>
date:      Tue Apr 02 15:08:33 2002 +0000

description:
Check the return code from the second invocation of installprereq(), to
make sure that a failed installation of a rpe-requisite package kills
the attempt to add the package. This reverts pkg_add(1) to traditional
behaviour.

Bump version number accordingly.

diffstat:

 usr.sbin/pkg_install/add/perform.c |  9 ++++++---
 usr.sbin/pkg_install/lib/version.h |  4 ++--
 2 files changed, 8 insertions(+), 5 deletions(-)

diffs (46 lines):

diff -r c85ba87446c8 -r e755bb444815 usr.sbin/pkg_install/add/perform.c
--- a/usr.sbin/pkg_install/add/perform.c        Tue Apr 02 14:16:34 2002 +0000
+++ b/usr.sbin/pkg_install/add/perform.c        Tue Apr 02 15:08:33 2002 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: perform.c,v 1.62 2002/03/06 17:45:20 agc Exp $ */
+/*     $NetBSD: perform.c,v 1.63 2002/04/02 15:08:33 agc Exp $ */
 
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
 #else
-__RCSID("$NetBSD: perform.c,v 1.62 2002/03/06 17:45:20 agc Exp $");
+__RCSID("$NetBSD: perform.c,v 1.63 2002/04/02 15:08:33 agc Exp $");
 #endif
 #endif
 
@@ -612,7 +612,10 @@
                                        done = installprereq(pkg, exact, &errc);
                                }
                                if (!done) {
-                                       (void) installprereq(pkg, p->name, &errc);
+                                       done = installprereq(pkg, p->name, &errc);
+                               }
+                               if (!done) {
+                                       errc = 1;
                                }
                        }
                } else if (Verbose) {
diff -r c85ba87446c8 -r e755bb444815 usr.sbin/pkg_install/lib/version.h
--- a/usr.sbin/pkg_install/lib/version.h        Tue Apr 02 14:16:34 2002 +0000
+++ b/usr.sbin/pkg_install/lib/version.h        Tue Apr 02 15:08:33 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: version.h,v 1.12 2002/03/06 17:45:21 agc Exp $ */
+/*     $NetBSD: version.h,v 1.13 2002/04/02 15:08:34 agc 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 "20020306"
+#define PKGTOOLS_VERSION "20020402"
 
 #endif /* _INST_LIB_VERSION_H_ */



Home | Main Index | Thread Index | Old Index