+# check if we're installing something already
+var=$(zpm list -f $localdb -s removing | wc -l)
+if [ $var -gt 0 ]; then
+ zpm list -v -f $localdb -s removing
+ die "already ($localdb) removing $var package(s)"
+fi
+var=$(zpm list -f $localdb -s updating | wc -l)
+if [ $var -gt 0 ]; then
+ zpm list -v -f $localdb -s updating
+ die "already ($localdb) updating $var package(s)"
+fi