]> hackdaworld.org Git - hdw-linux/hdw-linux.git/commitdiff
some hdw-get improvements
authorhackbard <hackbard>
Fri, 12 Aug 2005 01:09:07 +0000 (01:09 +0000)
committerhackbard <hackbard>
Fri, 12 Aug 2005 01:09:07 +0000 (01:09 +0000)
doc/CHANGELOG
misc/hdw-tools/hdw-get

index a8afd017707f366968fa822a9ca3be4efecd8d30..2e84e9ad7c65ec4904f620ab9e43a9e04d9ab4a3 100644 (file)
@@ -1,5 +1,9 @@
 *) 2005-08-11
 
+- more hdw-get improvements
+
+*) 2005-08-11
+
 - improved helper scripts
 - more package updates (stage 5 done)
 - fixes to fai routine, improved hdw-get
index 0ee4ba78cf521dc3dec5c4d552d55487b616ee82..7f2d1e6202cde775ae18b47813355ac7e272f162 100644 (file)
@@ -29,6 +29,7 @@ verbose="" ; no_dep=""
 auto_resolve_deps=""
 simulate=""
 base=""
+answer="y"
 
 FL_DIR="var/adm/flists"
 DEPS_DIR="var/adm/deps/run"
@@ -193,8 +194,9 @@ elif [ "$install" = "1" ] ; then
                udeps=""
                tudeps=""
                for dep in $deps; do
-                       [ ! -f $inst_root/$FL_DIR/$dep-* ] && \
-                               udeps="$dep $udeps"
+                       [ ! -f $inst_root/$FL_DIR/$dep-[0-9]* ] && \
+                               [ "$pkg" != "$dep" ] && \
+                                       udeps="$dep $udeps"
                done
                while [ "$udeps" != "$tudeps" ] ; do
                        tudeps="$udeps"
@@ -208,26 +210,29 @@ elif [ "$install" = "1" ] ; then
                                                [ "$i" = "$dep" ] && exists=1
                                        done
                                        [ "$exists" = "0" ] && \
-                                               udeps="$udeps $dep"
+                                               [ "$dep" != "$pkg" ] && \
+                                                       udeps="$udeps $dep"
                                done
                        done
                done
-               echo "$pkg depends on the following uninstalled packages:"
-               echo "$udeps"
-               echo
-               echo "continue? [y,n] (default 'n')"
-               if [ -z $auto_resolve_deps ] ; then
-                       read answer
-                       if [ "$answer" = "y" ] ; then
-                               for i in $udeps; do
-                                       [ "$simulate" != "1" ] && \
-                                       $0 -no-dep install $inst_root $i
-                               done
+               if [ -n "$udeps" ] ; then
+                       echo "$pkg has unresolved dependencies:"
+                       echo "-> $udeps <-"
+                       echo
+                       echo "continue? [y,n] (default 'n')"
+                       if [ -z $auto_resolve_deps ] ; then
+                               read answer
+                               if [ "$answer" = "y" ] ; then
+                                       for i in $udeps; do
+                                               [ "$simulate" != "1" ] && \
+                                               $0 -no-dep install $inst_root $i
+                                       done
+                               fi
                        fi
                fi
        fi
        
-       if [ "$simulate" != "1" ] ; then
+       if [ "$simulate" != "1" -a "$answer" != "n" ] ; then
        
        # check/install package
        if [ -f $package ] ; then