Ensure that the version part of $_url_base is correctly removed by
authorrpe <rpe@openbsd.org>
Tue, 11 Apr 2017 19:23:10 +0000 (19:23 +0000)
committerrpe <rpe@openbsd.org>
Tue, 11 Apr 2017 19:23:10 +0000 (19:23 +0000)
using $VNAME (x.y) instead of $VERSION (xy). This fixes the problem
that the version part ended up in installurl which is wrong anyway
and also confuses pkg_add.

Thanks to florian@ and trondd at kagu-tsuchi dot com for reporting
this.

OK tb@

distrib/miniroot/install.sub

index 4171e07..1708c6a 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/ksh
-#      $OpenBSD: install.sub,v 1.995 2017/04/07 22:53:25 rpe Exp $
+#      $OpenBSD: install.sub,v 1.996 2017/04/11 19:23:10 rpe Exp $
 #
 # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
 # Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@@ -1707,7 +1707,7 @@ install_http() {
        else
                # Remove the architecture and snaphots or version part.
                INSTALL_URL=${_url_base%/$ARCH}
-               INSTALL_URL=${INSTALL_URL%@(/$VERSION|/snapshots)}
+               INSTALL_URL=${INSTALL_URL%@(/$VNAME|/snapshots)}
        fi
 }