Add Make target to list all installed packages
[hvlinux.git] / stage2 / hv-install-1
index db8b333..26872a2 100755 (executable)
@@ -6,7 +6,13 @@ source /etc/profile
 check_for_root_user
 init_log_file
 
-rscr mult "Performing pre-install" pre-install
+if [ ${#} -eq 1 -a x"${1}" = x"log" ]; then
+    init_installed_packages_log
+fi
+
+if [ -z "${LIST_INSTALLED_PACKAGES}" ]; then
+    rscr mult "Performing pre-install" pre-install
+fi
 
 ipkg -m noac -l "kernel-headers" -s "kernel-headers" ${KERNEL}
 ipkg -m acnb -j -l "${PERL}-pass1" ${PERL}
@@ -14,9 +20,11 @@ ipkg -m noac ${MANPAGES}
 ipkg ${GLIBC}
 ipkg -m noac -s tzdata -c ${TZDATA}
 
-rscr once "Adjusting toolchain" toolchain-adjust
-rscr once "Creating temporary C++ toolchain hack" toolchain-hack-cpp-add
-rscr mult "Testing toolchain"   toolchain-test
+if [ -z "${LIST_INSTALLED_PACKAGES}" ]; then
+    rscr once "Adjusting toolchain" toolchain-adjust
+    rscr once "Creating temporary C++ toolchain hack" toolchain-hack-cpp-add
+    rscr mult "Testing toolchain"   toolchain-test
+fi
 
 export CC="gcc -isystem /usr/include"
 export CXX="g++ -isystem /usr/include"
@@ -35,8 +43,11 @@ unset LDFLAGS
 ipkg -m acnb ${ZLIB}
 ipkg ${BINUTILS}
 ipkg ${GCC}
-rscr once "Deleting temporary C++ toolchain hack" toolchain-hack-cpp-remove
-rscr mult "Testing toolchain" toolchain-test
+if [ -z "${LIST_INSTALLED_PACKAGES}" ]; then
+    rscr once "Deleting temporary C++ toolchain hack" toolchain-hack-cpp-remove
+    rscr mult "Testing toolchain" toolchain-test
+fi
+
 ipkg ${SED} "--bindir=/bin"
 ipkg ${LIBFFI}
 ipkg ${PYTHON} "--enable-shared"