Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/usr.sbin/pkg_install/add Pull up rev. 1.53 to netbsd-1-...
details: https://anonhg.NetBSD.org/src/rev/83c877c20c50
branches: netbsd-1-5
changeset: 489352:83c877c20c50
user: hubertf <hubertf%NetBSD.org@localhost>
date: Sun Sep 03 04:17:49 2000 +0000
description:
Pull up rev. 1.53 to netbsd-1-5 branch, OK'd by thorpej:
> * Code cleanup
> * Add a comment in one appropriate place
> * Indent properly
diffstat:
usr.sbin/pkg_install/add/perform.c | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
diffs (59 lines):
diff -r 4884d4b2b9fd -r 83c877c20c50 usr.sbin/pkg_install/add/perform.c
--- a/usr.sbin/pkg_install/add/perform.c Sun Sep 03 04:17:01 2000 +0000
+++ b/usr.sbin/pkg_install/add/perform.c Sun Sep 03 04:17:49 2000 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: perform.c,v 1.52 2000/06/16 23:49:17 sjg Exp $ */
+/* $NetBSD: perform.c,v 1.52.2.1 2000/09/03 04:17:49 hubertf 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.52 2000/06/16 23:49:17 sjg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.52.2.1 2000/09/03 04:17:49 hubertf Exp $");
#endif
#endif
@@ -140,10 +140,15 @@
strcpy(buf, s);
tmppkg = buf;
}
-
- if (!(Home = fileGetURL(NULL, tmppkg))) {
+
+ Home = fileGetURL(NULL, tmppkg);
+ if (Home == NULL) {
warnx("unable to fetch `%s' by URL", tmppkg);
if (ispkgpattern(pkg))
+ /*
+ * Seems we were not able to expand the pattern
+ * to something useful - bail out
+ */
return 1;
if (strstr(pkg, ".tgz") != NULL) {
@@ -152,7 +157,7 @@
* clever - the user should give something sane!)
*/
return 1;
- }
+ }
/* Second chance - maybe just a package name was given,
@@ -173,10 +178,11 @@
}
strcpy(buf, s);
tmppkg = buf;
- if (!(Home = fileGetURL(NULL, tmppkg))) {
+ Home = fileGetURL(NULL, tmppkg);
+ if (Home == NULL) {
warnx("unable to fetch `%s' by URL", tmppkg);
- return 1;
- }
+ return 1;
+ }
}
}
where_to = Home;
Home |
Main Index |
Thread Index |
Old Index