mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 03:32:24 +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
41
.gitignore
vendored
41
.gitignore
vendored
|
@ -4,6 +4,10 @@ tgz
|
||||||
lcl
|
lcl
|
||||||
|
|
||||||
# Flat make libs, binaries, etc
|
# Flat make libs, binaries, etc
|
||||||
|
*.a
|
||||||
|
*.o
|
||||||
|
*.req
|
||||||
|
FEATURE/
|
||||||
/bin/.paths
|
/bin/.paths
|
||||||
/bin/crossexec
|
/bin/crossexec
|
||||||
/bin/execrate
|
/bin/execrate
|
||||||
|
@ -11,8 +15,9 @@ lcl
|
||||||
/bin/iffe
|
/bin/iffe
|
||||||
/bin/ksh
|
/bin/ksh
|
||||||
/bin/mamake
|
/bin/mamake
|
||||||
/bin/proto
|
|
||||||
/bin/mktest
|
/bin/mktest
|
||||||
|
/bin/ok/
|
||||||
|
/bin/proto
|
||||||
/bin/pty
|
/bin/pty
|
||||||
/bin/regress
|
/bin/regress
|
||||||
/bin/rt
|
/bin/rt
|
||||||
|
@ -20,11 +25,41 @@ lcl
|
||||||
/bin/suid_exec
|
/bin/suid_exec
|
||||||
/fun/
|
/fun/
|
||||||
/include/
|
/include/
|
||||||
/lib/file/
|
/lib/
|
||||||
/lib/*.a
|
|
||||||
/man/
|
/man/
|
||||||
|
/src/cmd/INIT/crossexec
|
||||||
|
/src/cmd/INIT/execrate
|
||||||
|
/src/cmd/INIT/filter
|
||||||
|
/src/cmd/INIT/iffe
|
||||||
|
/src/cmd/INIT/ignore
|
||||||
|
/src/cmd/INIT/mamake
|
||||||
|
/src/cmd/INIT/mamprobe
|
||||||
|
/src/cmd/INIT/mktest
|
||||||
|
/src/cmd/INIT/mprobe
|
||||||
|
/src/cmd/INIT/package
|
||||||
|
/src/cmd/INIT/probe
|
||||||
|
/src/cmd/INIT/probe.ini
|
||||||
|
/src/cmd/INIT/probe.sh
|
||||||
|
/src/cmd/INIT/regress
|
||||||
|
/src/cmd/INIT/rt
|
||||||
|
/src/cmd/INIT/silent
|
||||||
|
/src/cmd/builtin/pty
|
||||||
|
/src/cmd/ksh93/ksh
|
||||||
|
/src/cmd/ksh93/shcomp
|
||||||
|
/src/cmd/ksh93/suid_exec
|
||||||
|
/src/lib/libast/*.h
|
||||||
|
/src/lib/libast/astmath.exe
|
||||||
|
/src/lib/libast/conf
|
||||||
|
/src/lib/libast/conftab.c
|
||||||
|
/src/lib/libast/lcgen
|
||||||
|
/src/lib/libast/lctab.c
|
||||||
|
/src/lib/libast/t.c
|
||||||
|
/src/lib/libcmd/cmdext.h
|
||||||
|
/src/lib/libcmd/cmdlist.h
|
||||||
|
/src/lib/libdll/dlldefs.h
|
||||||
|
|
||||||
# Miscellaneous artefacts
|
# Miscellaneous artefacts
|
||||||
|
*.dSYM/
|
||||||
*.bak
|
*.bak
|
||||||
*.sav
|
*.sav
|
||||||
*.old
|
*.old
|
||||||
|
|
30
bin/package
30
bin/package
|
@ -109,12 +109,12 @@ command=${0##*/}
|
||||||
case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in
|
case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in
|
||||||
0123) USAGE=$'
|
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?Glenn Fowler <gsf@research.att.com>]
|
||||||
[-author?Contributors to https://github.com/ksh93/ksh]
|
[-author?Contributors to https://github.com/ksh93/ksh]
|
||||||
[-copyright?(c) 1994-2012 AT&T Intellectual Property]
|
[-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]
|
[-license?http://www.eclipse.org/org/documents/epl-v10.html]
|
||||||
[+NAME?'$command$' - build, test and install ksh 93u+m]
|
[+NAME?'$command$' - build, test and install ksh 93u+m]
|
||||||
[+DESCRIPTION?The \b'$command$'\b command is the main control script
|
[+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
|
[+flat?With the \bmake\b action, create a flat view by linking all
|
||||||
files from \b$INSTALLROOT\b, minus \b*.old\b files,
|
files from \b$INSTALLROOT\b, minus \b*.old\b files,
|
||||||
onto their corresponding path under \b$PACKAGEROOT\b.
|
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.
|
Only one architecture can have a flat view.
|
||||||
If \bflat\b is specified with the \bclean\b action, then
|
If \bflat\b is specified with the \bclean\b action, then
|
||||||
only clean up this flat view and do not delete \b$INSTALLROOT\b.]
|
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.
|
Show environment and actions but do not execute.
|
||||||
flat With the make action, create a flat view by linking all files from
|
flat With the make action, create a flat view by linking all files from
|
||||||
$INSTALLROOT, minus *.old files, onto their corresponding path under
|
$INSTALLROOT, minus *.old files, onto their corresponding path under
|
||||||
$PACKAGEROOT. Only one architecture can have a flat view. If flat is
|
$PACKAGEROOT. Subsequent make actions will update an existing flat
|
||||||
specified with the clean action, then only clean up this flat view
|
view whether or not flat is specified. Only one architecture can have
|
||||||
and do not delete $INSTALLROOT.
|
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.
|
force Force the action to override saved state.
|
||||||
never Run make -N and show other actions.
|
never Run make -N and show other actions.
|
||||||
only Only operate on the specified packages.
|
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)
|
mamake(1), pax(1), pkgadd(1), pkgmk(1), rpm(1), sh(1), tar(1), optget(3)
|
||||||
|
|
||||||
IMPLEMENTATION
|
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 Glenn Fowler <gsf@research.att.com>
|
||||||
author Contributors to https://github.com/ksh93/ksh
|
author Contributors to https://github.com/ksh93/ksh
|
||||||
copyright (c) 1994-2012 AT&T Intellectual Property
|
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'
|
license http://www.eclipse.org/org/documents/epl-v10.html'
|
||||||
case $1 in
|
case $1 in
|
||||||
html) echo "</pre></body></html>" ;;
|
html) echo "</pre></body></html>" ;;
|
||||||
|
@ -2778,7 +2781,7 @@ clean|clobber)
|
||||||
then set -- "$@" "$p" # add to new PPs
|
then set -- "$@" "$p" # add to new PPs
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
exec rm -f "$@" # rm all at once: fast
|
exec rm -f -- "$@" # rm all at once: fast
|
||||||
' "$0" {} +
|
' "$0" {} +
|
||||||
case $flat in
|
case $flat in
|
||||||
0) note "deleting arch/$HOSTTYPE"
|
0) note "deleting arch/$HOSTTYPE"
|
||||||
|
@ -3351,13 +3354,18 @@ cat $j $k
|
||||||
then set -- "$@" "$d" # add to new PPs
|
then set -- "$@" "$d" # add to new PPs
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
exec rm -rf "$@" # rm all at once: fast
|
exec rm -rf -- "$@" # rm all at once: fast
|
||||||
' "$0" {} +
|
' "$0" {} +
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if test -d "$PACKAGEROOT/lib/package/gen"
|
||||||
|
then a='updating'
|
||||||
|
flat=1
|
||||||
|
else a='creating'
|
||||||
|
fi
|
||||||
case $flat in
|
case $flat in
|
||||||
1) note "updating flat view"
|
1) note "$a flat view"
|
||||||
cd "$PACKAGEROOT" || exit
|
cd "$PACKAGEROOT" || exit
|
||||||
$exec find "arch/$HOSTTYPE" -type f ! -name '*.old' -exec "$SHELL" -c '
|
$exec find "arch/$HOSTTYPE" -type f ! -name '*.old' -exec "$SHELL" -c '
|
||||||
for h
|
for h
|
||||||
|
@ -3365,7 +3373,7 @@ cat $j $k
|
||||||
test "$h" -ef "$p" && continue # already created
|
test "$h" -ef "$p" && continue # already created
|
||||||
d=${p%/*}
|
d=${p%/*}
|
||||||
test -d "$d" || mkdir -p "$d" || exit
|
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
|
done
|
||||||
' "$0" {} +
|
' "$0" {} +
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -109,12 +109,12 @@ command=${0##*/}
|
||||||
case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in
|
case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in
|
||||||
0123) USAGE=$'
|
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?Glenn Fowler <gsf@research.att.com>]
|
||||||
[-author?Contributors to https://github.com/ksh93/ksh]
|
[-author?Contributors to https://github.com/ksh93/ksh]
|
||||||
[-copyright?(c) 1994-2012 AT&T Intellectual Property]
|
[-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]
|
[-license?http://www.eclipse.org/org/documents/epl-v10.html]
|
||||||
[+NAME?'$command$' - build, test and install ksh 93u+m]
|
[+NAME?'$command$' - build, test and install ksh 93u+m]
|
||||||
[+DESCRIPTION?The \b'$command$'\b command is the main control script
|
[+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
|
[+flat?With the \bmake\b action, create a flat view by linking all
|
||||||
files from \b$INSTALLROOT\b, minus \b*.old\b files,
|
files from \b$INSTALLROOT\b, minus \b*.old\b files,
|
||||||
onto their corresponding path under \b$PACKAGEROOT\b.
|
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.
|
Only one architecture can have a flat view.
|
||||||
If \bflat\b is specified with the \bclean\b action, then
|
If \bflat\b is specified with the \bclean\b action, then
|
||||||
only clean up this flat view and do not delete \b$INSTALLROOT\b.]
|
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.
|
Show environment and actions but do not execute.
|
||||||
flat With the make action, create a flat view by linking all files from
|
flat With the make action, create a flat view by linking all files from
|
||||||
$INSTALLROOT, minus *.old files, onto their corresponding path under
|
$INSTALLROOT, minus *.old files, onto their corresponding path under
|
||||||
$PACKAGEROOT. Only one architecture can have a flat view. If flat is
|
$PACKAGEROOT. Subsequent make actions will update an existing flat
|
||||||
specified with the clean action, then only clean up this flat view
|
view whether or not flat is specified. Only one architecture can have
|
||||||
and do not delete $INSTALLROOT.
|
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.
|
force Force the action to override saved state.
|
||||||
never Run make -N and show other actions.
|
never Run make -N and show other actions.
|
||||||
only Only operate on the specified packages.
|
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)
|
mamake(1), pax(1), pkgadd(1), pkgmk(1), rpm(1), sh(1), tar(1), optget(3)
|
||||||
|
|
||||||
IMPLEMENTATION
|
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 Glenn Fowler <gsf@research.att.com>
|
||||||
author Contributors to https://github.com/ksh93/ksh
|
author Contributors to https://github.com/ksh93/ksh
|
||||||
copyright (c) 1994-2012 AT&T Intellectual Property
|
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'
|
license http://www.eclipse.org/org/documents/epl-v10.html'
|
||||||
case $1 in
|
case $1 in
|
||||||
html) echo "</pre></body></html>" ;;
|
html) echo "</pre></body></html>" ;;
|
||||||
|
@ -2778,7 +2781,7 @@ clean|clobber)
|
||||||
then set -- "$@" "$p" # add to new PPs
|
then set -- "$@" "$p" # add to new PPs
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
exec rm -f "$@" # rm all at once: fast
|
exec rm -f -- "$@" # rm all at once: fast
|
||||||
' "$0" {} +
|
' "$0" {} +
|
||||||
case $flat in
|
case $flat in
|
||||||
0) note "deleting arch/$HOSTTYPE"
|
0) note "deleting arch/$HOSTTYPE"
|
||||||
|
@ -3351,13 +3354,18 @@ cat $j $k
|
||||||
then set -- "$@" "$d" # add to new PPs
|
then set -- "$@" "$d" # add to new PPs
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
exec rm -rf "$@" # rm all at once: fast
|
exec rm -rf -- "$@" # rm all at once: fast
|
||||||
' "$0" {} +
|
' "$0" {} +
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if test -d "$PACKAGEROOT/lib/package/gen"
|
||||||
|
then a='updating'
|
||||||
|
flat=1
|
||||||
|
else a='creating'
|
||||||
|
fi
|
||||||
case $flat in
|
case $flat in
|
||||||
1) note "updating flat view"
|
1) note "$a flat view"
|
||||||
cd "$PACKAGEROOT" || exit
|
cd "$PACKAGEROOT" || exit
|
||||||
$exec find "arch/$HOSTTYPE" -type f ! -name '*.old' -exec "$SHELL" -c '
|
$exec find "arch/$HOSTTYPE" -type f ! -name '*.old' -exec "$SHELL" -c '
|
||||||
for h
|
for h
|
||||||
|
@ -3365,7 +3373,7 @@ cat $j $k
|
||||||
test "$h" -ef "$p" && continue # already created
|
test "$h" -ef "$p" && continue # already created
|
||||||
d=${p%/*}
|
d=${p%/*}
|
||||||
test -d "$d" || mkdir -p "$d" || exit
|
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
|
done
|
||||||
' "$0" {} +
|
' "$0" {} +
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue