scripts/resolveipspackages
changeset 20 565e0daa124c
parent 4 dc96cad1e9ea
equal deleted inserted replaced
19:f720bde9865f 20:565e0daa124c
       
     1 #!/usr/bin/bash
       
     2 #20090818 Thomas Wagner - install missing packages from the current package repository based on what pkgtool build-order cannot resolve
       
     3 MISSING=`pkgtool build-order --autodeps $* | awk '/No spec/ { print $6 }' | sed -e 's/-devel$//' -e 's/-root$//' -e 's/-doc$//' | sort -u`
       
     4 if [ -z $MISSING ]
       
     5   then
       
     6    echo "Lucky you, no packages from outside the build recipe repository seem to be missing"
       
     7    exit 0
       
     8   else
       
     9    echo "Found the packages listed below to be missing, will try to install them from the"
       
    10    echo "local repository (should not hit packages from your build recipe repository)."
       
    11    echo "Watch for errors in the output."
       
    12    echo "========="
       
    13    echo "$MISSING"
       
    14    echo "========="
       
    15    echo "Now we try to automatically install missing packages by:"
       
    16    echo "pfexec pkg install $MISSING"
       
    17    echo "Please watch out for lines indicating that packages are not found in the catalog"
       
    18    echo ""
       
    19    pfexec pkg install $MISSING
       
    20    echo "Done. Exit code: $?"
       
    21   fi