Remove cust_pkg() not that pkg_foo(1) has been removed.

This commit is contained in:
Warner Losh 2015-08-22 23:09:19 +00:00
parent 4beec13537
commit 18803951d5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=287028
3 changed files with 3 additions and 52 deletions

View File

@ -45,7 +45,7 @@ NANO_SRC=/usr/src
# Where nanobsd additional files live under the source tree
NANO_TOOLS=tools/tools/nanobsd
# Where cust_pkg() finds packages to install
# Where cust_pkgng() finds packages to install
NANO_PACKAGE_DIR=${NANO_SRC}/${NANO_TOOLS}/Pkg
NANO_PACKAGE_LIST="*"
@ -762,55 +762,6 @@ cust_install_files () (
#######################################################################
# Install packages from ${NANO_PACKAGE_DIR}
cust_pkg () (
# If the package directory doesn't exist, we're done.
if [ ! -d ${NANO_PACKAGE_DIR} ]; then
echo "DONE 0 packages"
return 0
fi
# Copy packages into chroot
mkdir -p ${NANO_WORLDDIR}/Pkg ${NANO_WORLDDIR}/${NANO_PKG_META_BASE}/pkg
(
cd ${NANO_PACKAGE_DIR}
find ${NANO_PACKAGE_LIST} -print |
cpio -Ldumpv ${NANO_WORLDDIR}/Pkg
)
# Count & report how many we have to install
todo=`ls ${NANO_WORLDDIR}/Pkg | wc -l`
echo "=== TODO: $todo"
ls ${NANO_WORLDDIR}/Pkg
echo "==="
while true
do
# Record how many we have now
have=`ls ${NANO_WORLDDIR}/${NANO_PKG_META_BASE}/pkg | wc -l`
# Attempt to install more packages
# ...but no more than 200 at a time due to pkg_add's internal
# limitations.
CR0 'ls Pkg/*tbz | xargs -n 200 env PKG_DBDIR='${NANO_PKG_META_BASE}'/pkg pkg_add -v -F'
# See what that got us
now=`ls ${NANO_WORLDDIR}/${NANO_PKG_META_BASE}/pkg | wc -l`
echo "=== NOW $now"
ls ${NANO_WORLDDIR}/${NANO_PKG_META_BASE}/pkg
echo "==="
if [ $now -eq $todo ] ; then
echo "DONE $now packages"
break
elif [ $now -eq $have ] ; then
echo "FAILED: Nothing happened on this pass"
exit 2
fi
done
nano_rm -rf ${NANO_WORLDDIR}/Pkg
)
cust_pkgng () (
# If the package directory doesn't exist, we're done.

View File

@ -66,7 +66,7 @@ cust_boot_cfg () (
echo "hint.acpi.0.disabled=\"1\"" >> boot/loader.conf
)
customize_cmd cust_boot_cfg
customize_cmd cust_pkg
customize_cmd cust_pkgng
cust_etc_cfg () (
cd ${NANO_WORLDDIR}
mkdir -pv z/scratch

View File

@ -65,7 +65,7 @@ customize_cmd cust_ld32_cfg
#)
#customize_cmd cust_boot_cfg
customize_cmd cust_pkg
customize_cmd cust_pkgng
cust_etc_cfg () (
cd ${NANO_WORLDDIR}