+[ "$chr" = "1" ] && root=$hdw_build_dir
+
+if [ "$rtd" = "1" ] ; then
+ echo "# hdw packages + run time dependencies"
+ echo "#"
+ echo "# created `date`"
+ echo
+ echo "00-dirtree -"
+ for i in $root/var/adm/flists/*; do
+ package=`basename $i | sed 's/-[0-9].*//'`
+ if [ -n "`echo $package | grep -v stage[0-1]`" ] ; then
+ file="$root/var/adm/deps/run/$package"
+ echo -en $package
+ echo -en " - "
+ if [ -f $file ] ; then
+ for j in `cat $file`; do
+ echo -en "$j "
+ done
+ fi
+ echo -en "\n"
+ fi
+ done
+fi