Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst Try to properly guess a path on the ftp ser...
details: https://anonhg.NetBSD.org/src/rev/f650ed335103
branches: trunk
changeset: 433392:f650ed335103
user: martin <martin%NetBSD.org@localhost>
date: Wed Sep 12 13:44:05 2018 +0000
description:
Try to properly guess a path on the ftp server for pkg binaries
and use that as default.
Assume for $N.99 (current) we can use $N.0. Otherwise strip all
RC*/STABLE* annotations and just use the plain numbers.
diffstat:
usr.sbin/sysinst/Makefile.inc | 5 ++++-
usr.sbin/sysinst/defs.h | 6 +++++-
usr.sbin/sysinst/main.c | 4 ++--
3 files changed, 11 insertions(+), 4 deletions(-)
diffs (61 lines):
diff -r 04e0ffc3e02b -r f650ed335103 usr.sbin/sysinst/Makefile.inc
--- a/usr.sbin/sysinst/Makefile.inc Wed Sep 12 09:49:03 2018 +0000
+++ b/usr.sbin/sysinst/Makefile.inc Wed Sep 12 13:44:05 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.10 2018/09/05 12:01:52 martin Exp $
+# $NetBSD: Makefile.inc,v 1.11 2018/09/12 13:44:05 martin Exp $
#
# Makefile for sysinst
@@ -61,10 +61,13 @@
CPPFLAGS+= -DSYSINST_HTTP_HOST=\"nycdn.NetBSD.org\"
.if (${DISTRIBVER:M*.99.*})
CPPFLAGS+= -DREL_PATH=\"HEAD\"
+CPPFLAGS+= -DPKG_SUBDIR="\"${DISTRIBVER:C/\.99\.[0-9]*[_A-Z]*$//}.0\""
.elif (${DISTRIBVER:M*.[0-9].[0-9]*})
CPPFLAGS+= -DREL_PATH=\"netbsd-${DISTRIBVER:C/\.[0-9][_A-Z]*$//:S/./-/}\"
+CPPFLAGS+= -DPKG_SUBDIR="\"${DISTRIBVER:C/_.*$//}\""
.elif (${DISTRIBVER:M*.[0-9]*})
CPPFLAGS+= -DREL_PATH=\"netbsd-${DISTRIBVER:C/\.[0-9][_A-Z]*$//}\"
+CPPFLAGS+= -DPKG_SUBDIR="\"${DISTRIBVER:C/_.*$//}\""
.endif
.endif
diff -r 04e0ffc3e02b -r f650ed335103 usr.sbin/sysinst/defs.h
--- a/usr.sbin/sysinst/defs.h Wed Sep 12 09:49:03 2018 +0000
+++ b/usr.sbin/sysinst/defs.h Wed Sep 12 13:44:05 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.16 2018/09/11 08:05:18 martin Exp $ */
+/* $NetBSD: defs.h,v 1.17 2018/09/12 13:44:05 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -367,6 +367,10 @@
#define SYSINST_PKG_DIR "pub/pkgsrc/packages/NetBSD"
#endif
+#if !defined(PKG_SUBDIR)
+#define PKG_SUBDIR REL
+#endif
+
#if !defined(SYSINST_PKGSRC_HOST)
#define SYSINST_PKGSRC_HOST SYSINST_PKG_HOST
#endif
diff -r 04e0ffc3e02b -r f650ed335103 usr.sbin/sysinst/main.c
--- a/usr.sbin/sysinst/main.c Wed Sep 12 09:49:03 2018 +0000
+++ b/usr.sbin/sysinst/main.c Wed Sep 12 13:44:05 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.8 2018/09/11 08:05:18 martin Exp $ */
+/* $NetBSD: main.c,v 1.9 2018/09/12 13:44:05 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -112,7 +112,7 @@
{"pkg host", SYSINST_PKG_HOST, pkg.xfer_host[XFER_FTP], sizeof pkg.xfer_host[XFER_FTP]},
{"pkg http host", SYSINST_PKG_HTTP_HOST, pkg.xfer_host[XFER_HTTP], sizeof pkg.xfer_host[XFER_HTTP]},
{"pkg dir", SYSINST_PKG_DIR, pkg.dir, sizeof pkg.dir},
- {"pkg prefix", "/" MACH "/" REL "/All", pkg_dir, sizeof pkg_dir},
+ {"pkg prefix", "/" MACH "/" PKG_SUBDIR "/All", pkg_dir, sizeof pkg_dir},
{"pkg user", "ftp", pkg.user, sizeof pkg.user},
{"pkg pass", "", pkg.pass, sizeof pkg.pass},
{"pkg proxy", "", pkg.proxy, sizeof pkg.proxy},
Home |
Main Index |
Thread Index |
Old Index