Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jan 2016 00:09:53 +0000 (UTC)
From:      Devin Teske <dteske@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r294865 - head/usr.sbin/bsdconfig/share/packages
Message-ID:  <201601270009.u0R09rQF021146@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dteske
Date: Wed Jan 27 00:09:53 2016
New Revision: 294865
URL: https://svnweb.freebsd.org/changeset/base/294865

Log:
  Fix ABI parsing

Modified:
  head/usr.sbin/bsdconfig/share/packages/musthavepkg.subr

Modified: head/usr.sbin/bsdconfig/share/packages/musthavepkg.subr
==============================================================================
--- head/usr.sbin/bsdconfig/share/packages/musthavepkg.subr	Wed Jan 27 00:08:23 2016	(r294864)
+++ head/usr.sbin/bsdconfig/share/packages/musthavepkg.subr	Wed Jan 27 00:09:53 2016	(r294865)
@@ -1,6 +1,6 @@
 if [ ! "$_PACKAGES_MUSTHAVEPKG_SUBR" ]; then _PACKAGES_MUSTHAVEPKG_SUBR=1
 #
-# Copyright (c) 2014 Devin Teske
+# Copyright (c) 2014-2016 Devin Teske
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -45,7 +45,11 @@ f_include $BSDCFG_SHARE/mustberoot.subr
 f_musthavepkg_init()
 {
 	local funcname=f_musthavepkg_init
-	local pkg_abi_awk='$1~/^ABI/{print $NF; exit}'
+	local pkg_abi_awk=' # BEGIN-AWK
+		$1 ~ /^ABI/ && $0 = $NF, sub(/^"/, "") && sub(/".*/, "") {
+			print; found = 1; exit
+		} END { exit ! found }
+	' # END-AWK
 
 	if [ "$PKG_ABI" ]; then # Already set
 		f_dprintf "PKG_ABI=[%s]" "$PKG_ABI"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601270009.u0R09rQF021146>