Skip to content

Commit 967ba4a

Browse files
committed
build: bin/package: fix HOSTTAG code by moving it (re: a72b60e)
D'oh! The host tag was also getting added to 'bin/package host cpu' output (number of CPU cores on the system), which is of course not correct. That code must only be executed if we run the type a.k.a. canon action.
1 parent 1fcd9c9 commit 967ba4a

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

bin/package

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ command=${0##*/}
125125
case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in
126126
0123) USAGE=$'
127127
[-?
128-
@(#)$Id: '$command$' (ksh 93u+m) 2026-03-31 $
128+
@(#)$Id: '$command$' (ksh 93u+m) 2026-04-02 $
129129
]
130130
[-author?Glenn Fowler <gsf@research.att.com>]
131131
[-author?Contributors to https://github.com/ksh93/ksh]
@@ -563,7 +563,7 @@ SEE ALSO
563563
pkgadd(1), pkgmk(1), rpm(1), sh(1), tar(1), optget(3)
564564

565565
IMPLEMENTATION
566-
version package (ksh 93u+m) 2026-03-31
566+
version package (ksh 93u+m) 2026-04-02
567567
author Glenn Fowler <gsf@research.att.com>
568568
author Contributors to https://github.com/ksh93/ksh
569569
copyright (c) 1994-2012 AT&T Intellectual Property
@@ -1571,17 +1571,18 @@ int b(void) { return 0; }
15711571
esac"
15721572
done
15731573
_hostinfo_="$_hostinfo_ $type"
1574+
1575+
# add host tag if given
1576+
1577+
case $HOSTTAG in
1578+
?*) _hostinfo_=${_hostinfo_},$HOSTTAG ;;
1579+
esac
15741580
;;
15751581
esac
15761582
done
15771583
set -- $_hostinfo_
15781584
_hostinfo_=$*
15791585

1580-
# add host tag if given
1581-
case $HOSTTAG in
1582-
?*) _hostinfo_=${_hostinfo_},$HOSTTAG ;;
1583-
esac
1584-
15851586
# restore the global state
15861587

15871588
PATH=$path

0 commit comments

Comments
 (0)