diff options
| author | agc <agc@NetBSD.org> | 2002-04-02 15:08:33 +0000 |
|---|---|---|
| committer | agc <agc@NetBSD.org> | 2002-04-02 15:08:33 +0000 |
| commit | 5e5f49ecfa2f4eff7154d1bcdb53a5f7a011f969 (patch) | |
| tree | 495bd354b5b767cd439d90e99ba6f44ff4c5d77e /usr.sbin/pkg_install | |
| parent | 771978676252255167b66b8d1900a320e9cfb341 (diff) | |
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 (limited to 'usr.sbin/pkg_install')
| -rw-r--r-- | usr.sbin/pkg_install/add/perform.c | 9 | ||||
| -rw-r--r-- | usr.sbin/pkg_install/lib/version.h | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/usr.sbin/pkg_install/add/perform.c b/usr.sbin/pkg_install/add/perform.c index 94498b4dcfd..4936ae72d03 100644 --- a/usr.sbin/pkg_install/add/perform.c +++ b/usr.sbin/pkg_install/add/perform.c @@ -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 @@ pkg_do(char *pkg) 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 --git a/usr.sbin/pkg_install/lib/version.h b/usr.sbin/pkg_install/lib/version.h index d3dc5567e5c..b57ecdb35e4 100644 --- a/usr.sbin/pkg_install/lib/version.h +++ b/usr.sbin/pkg_install/lib/version.h @@ -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_ */ |
