{
case $COMMAND_MODE in
do | auto )
- command_do_pre
+ command_do_chroot_cleanup
command_do_starter_portsnap
command_do_starter_pkg
+ command_do_pre
command_do_starter_clean
command_do_main_init_resinst
command_do_chroot_enter_if_incomplete "$@"
local mode stdout
[ $opt_fullcourse = no ] && return
message_section_title "Full course starter: Update the ports tree"
- if [ -e "$opt_basedir/builder$PORTSNAP_WORKDIR/INDEX" ]
- then
- mode=update
- else
- mode=extract
- fi
- if [ $opt_batch_mode = no ]
- then
- stdout=/dev/stdout
- else
- stdout=/dev/null
- fi
- chroot "$opt_basedir"/builder /usr/bin/env portsnap fetch $mode > $stdout
+ pkgsys_update_portstree
message_echo
}
program_exec_and_record_completion STARTER_GUEST_PORTS_TREE
}
-# ============= Starter process in the chroot environment: Update the package repository =============
+# ============= Starter process of the full course: Update the package repository =============
command_do_starter_pkg ()
{
local PROGRAM_DEPENDS
local opts
[ $opt_fullcourse = no ] && return
message_section_title "Full course starter: Update the package repository"
- if [ $opt_batch_mode = no ]
- then
- opts=
- else
- opts='-q'
- fi
- chroot "$opt_basedir"/builder /usr/bin/env pkg update $opts
+ pkg_update_pkgrepository
message_echo
}
program_exec_and_record_completion STARTER_GUEST_PKG_REPO
}
-# ============= Starter process in the chroot environment: Clean the temporary database =============
+# ============= Starter process of the full course: Clean the temporary database =============
command_do_starter_clean ()
{
local PROGRAM_DEPENDS
# ============= Main pre-operation of do/auto =============
command_do_pre ()
{
- # Initial clean up
- command_do_chroot_cleanup
-
# Build and mount of the chroot environment
fs_build_chroot
fs_mount
MYVERSION=4.1.0
COMPATIBLE_VERSIONS='^(4\.[1]\.[0-9])$'
# Template for development versions
- MYVERSION=4.0.0+toward_4.1.0_20180913001823
+ MYVERSION=4.0.0+toward_4.1.0_20180913004127
COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9]]|4\.[0]\.[0]+(|\+toward_4\.[0-1]\.[0-9]+_[0-9]+))$'
}
stat -t %s -f %m "${PORTS_INDEX_DB}" 2> /dev/null || :
}
+# ============= Update the ports tree =============
+pkgsys_update_portstree ()
+{
+ if [ -e "$PORTSNAP_WORKDIR/INDEX" ]
+ then
+ mode=update
+ else
+ mode=extract
+ fi
+ if [ $opt_batch_mode = no ]
+ then
+ stdout=/dev/stdout
+ else
+ stdout=/dev/null
+ fi
+ portsnap fetch $mode > $stdout
+}
+
# ============= Check implementation of the ports tree =============
pkgsys_chk_ports_tree_implementation ()
{
pkg_is_tool_available
}
}
+ pkg_update_pkgrepository ()
+ {
+ local opts
+ pkg_is_tool_available || return 0
+ if [ $opt_batch_mode = no ]
+ then
+ opts=
+ else
+ opts='-q'
+ fi
+ pkg update $opts
+ }
if ! pkg_rescue_tools
then
message_echo "WARNING: Pkgng is still missing, but continuing for the time being." >&2
}
pkg_loadconf () { :; }
pkg_rescue_tools () { :; }
+ pkg_update_pkgrepository () { :; }
fi
}