@@ -59,10 +59,10 @@ log "Clean installing and caching ${package_count} package(s)."
5959log_empty_line
6060
6161manifest_main=" "
62- log " Package list:"
62+ log_debug " Package list:"
6363for package in ${packages} ; do
6464 manifest_main=" ${manifest_main}${package} ,"
65- log " - ${package} "
65+ log_debug " - ${package} "
6666done
6767write_manifest " main" " ${manifest_main} " " ${cache_dir} /manifest_main.log"
6868
@@ -92,11 +92,13 @@ log "Installation log written to ${install_log_filepath}"
9292log_empty_line
9393
9494installed_packages=$( get_installed_packages " ${install_log_filepath} " )
95- log " Installed package list:"
96- for installed_package in ${installed_packages} ; do
97- # Reformat for human friendly reading.
98- log " - $( echo ${installed_package} | awk -F\= ' {print $1" ("$2")"}' ) "
99- done
95+ if [ " ${debug} " == " true" ] ; then
96+ log " Installed package list:"
97+ for installed_package in ${installed_packages} ; do
98+ # Reformat for human friendly reading.
99+ log " - $( echo ${installed_package} | awk -F\= ' {print $1" ("$2")"}' ) "
100+ done
101+ fi
100102
101103log_empty_line
102104
@@ -108,7 +110,7 @@ for installed_package in ${installed_packages}; do
108110 # Sanity test in case APT enumerates duplicates.
109111 if test ! -f " ${cache_filepath} " ; then
110112 read package_name package_ver < <( get_package_name_ver " ${installed_package} " )
111- log " * Caching ${package_name} to ${cache_filepath} ..."
113+ log_debug " * Caching ${package_name} to ${cache_filepath} ..."
112114
113115 # Get the entry in /var/lib/dpkg/status
114116 mkdir -p /var/tmp/dpkg-restore || :
@@ -131,7 +133,7 @@ for installed_package in ${installed_packages}; do
131133 done
132134 )
133135
134- log " done (compressed size $( du -h " ${cache_filepath} " | cut -f1) )."
136+ log_debug " done (compressed size $( du -h " ${cache_filepath} " | cut -f1) )."
135137 fi
136138
137139 # Comma delimited name:ver pairs in the all packages manifest.
0 commit comments