mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
bin/package, src/cmd/INIT/package.sh: - Automatically update an existing flat view even if 'flat' wasn't given for a make action. This stops a flat view becoming inaccurate if you forget to use 'bin/package flat make' consistently. If the $PACKAGEROOT/lib/package/gen directory exists, an existing flat view is assumed. - Correct symlink fallbacks. We need an absolute path for the symlink target or it's going to be broken. .gitignore: - Update.
This commit is contained in:
parent
f1627e2a8c
commit
a1c613c48d
3 changed files with 76 additions and 25 deletions
|
@ -109,12 +109,12 @@ command=${0##*/}
|
|||
case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in
|
||||
0123) USAGE=$'
|
||||
[-?
|
||||
@(#)$Id: '$command$' (ksh 93u+m) 2021-12-31 $
|
||||
@(#)$Id: '$command$' (ksh 93u+m) 2022-01-02 $
|
||||
]
|
||||
[-author?Glenn Fowler <gsf@research.att.com>]
|
||||
[-author?Contributors to https://github.com/ksh93/ksh]
|
||||
[-copyright?(c) 1994-2012 AT&T Intellectual Property]
|
||||
[-copyright?(c) 2020-2021 Contributors to https://github.com/ksh93/ksh]
|
||||
[-copyright?(c) 2020-2022 Contributors to https://github.com/ksh93/ksh]
|
||||
[-license?http://www.eclipse.org/org/documents/epl-v10.html]
|
||||
[+NAME?'$command$' - build, test and install ksh 93u+m]
|
||||
[+DESCRIPTION?The \b'$command$'\b command is the main control script
|
||||
|
@ -144,6 +144,8 @@ case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in
|
|||
[+flat?With the \bmake\b action, create a flat view by linking all
|
||||
files from \b$INSTALLROOT\b, minus \b*.old\b files,
|
||||
onto their corresponding path under \b$PACKAGEROOT\b.
|
||||
Subsequent \bmake\b actions will update an existing flat view
|
||||
whether or not \bflat\b is specified.
|
||||
Only one architecture can have a flat view.
|
||||
If \bflat\b is specified with the \bclean\b action, then
|
||||
only clean up this flat view and do not delete \b$INSTALLROOT\b.]
|
||||
|
@ -406,9 +408,10 @@ DESCRIPTION
|
|||
Show environment and actions but do not execute.
|
||||
flat With the make action, create a flat view by linking all files from
|
||||
$INSTALLROOT, minus *.old files, onto their corresponding path under
|
||||
$PACKAGEROOT. Only one architecture can have a flat view. If flat is
|
||||
specified with the clean action, then only clean up this flat view
|
||||
and do not delete $INSTALLROOT.
|
||||
$PACKAGEROOT. Subsequent make actions will update an existing flat
|
||||
view whether or not flat is specified. Only one architecture can have
|
||||
a flat view. If flat is specified with the clean action, then only
|
||||
clean up this flat view and do not delete $INSTALLROOT.
|
||||
force Force the action to override saved state.
|
||||
never Run make -N and show other actions.
|
||||
only Only operate on the specified packages.
|
||||
|
@ -529,11 +532,11 @@ SEE ALSO
|
|||
mamake(1), pax(1), pkgadd(1), pkgmk(1), rpm(1), sh(1), tar(1), optget(3)
|
||||
|
||||
IMPLEMENTATION
|
||||
version package (ksh 93u+m) 2021-12-31
|
||||
version package (ksh 93u+m) 2022-01-02
|
||||
author Glenn Fowler <gsf@research.att.com>
|
||||
author Contributors to https://github.com/ksh93/ksh
|
||||
copyright (c) 1994-2012 AT&T Intellectual Property
|
||||
copyright (c) 2020-2021 Contributors to https://github.com/ksh93/ksh
|
||||
copyright (c) 2020-2022 Contributors to https://github.com/ksh93/ksh
|
||||
license http://www.eclipse.org/org/documents/epl-v10.html'
|
||||
case $1 in
|
||||
html) echo "</pre></body></html>" ;;
|
||||
|
@ -2778,7 +2781,7 @@ clean|clobber)
|
|||
then set -- "$@" "$p" # add to new PPs
|
||||
fi
|
||||
done
|
||||
exec rm -f "$@" # rm all at once: fast
|
||||
exec rm -f -- "$@" # rm all at once: fast
|
||||
' "$0" {} +
|
||||
case $flat in
|
||||
0) note "deleting arch/$HOSTTYPE"
|
||||
|
@ -3351,13 +3354,18 @@ cat $j $k
|
|||
then set -- "$@" "$d" # add to new PPs
|
||||
fi
|
||||
done
|
||||
exec rm -rf "$@" # rm all at once: fast
|
||||
exec rm -rf -- "$@" # rm all at once: fast
|
||||
' "$0" {} +
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -d "$PACKAGEROOT/lib/package/gen"
|
||||
then a='updating'
|
||||
flat=1
|
||||
else a='creating'
|
||||
fi
|
||||
case $flat in
|
||||
1) note "updating flat view"
|
||||
1) note "$a flat view"
|
||||
cd "$PACKAGEROOT" || exit
|
||||
$exec find "arch/$HOSTTYPE" -type f ! -name '*.old' -exec "$SHELL" -c '
|
||||
for h
|
||||
|
@ -3365,7 +3373,7 @@ cat $j $k
|
|||
test "$h" -ef "$p" && continue # already created
|
||||
d=${p%/*}
|
||||
test -d "$d" || mkdir -p "$d" || exit
|
||||
ln -f "$h" "$p" 2>/dev/null || ln -sf "$h" "$p" || exit
|
||||
ln -f "$h" "$p" 2>/dev/null || ln -sf "$INSTALLROOT/$p" "$p" || exit
|
||||
done
|
||||
' "$0" {} +
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue