+#
+# package with failing pre-script
+#
+pkgid=fourth-1.0-1
+PF=$pkgid.zpm
+newpkg $pkgid /bin/head
+skiponfail 3 "can't create $pkgid" || {
+ zpm script -s -f $PF -p pre-install $pkgid /bin/false
+ okexit "add false pre-install script to $pkgid"
+ skiponfail 1 "can't set $pkgid pre-install script" || {
+ zpm install -R. -d local.db -f $PF $pkgid 2>/dev/null
+ failsok failed to install $pkgid
+ }
+}
+
+tryrun zpm uninstall -R. -d local.db third-1.0-1
+test -f bin/echo
+failsok bin/echo removed
+
+pkgid=fifth-1.0-1
+PF=$pkgid.zpm
+newpkg $pkgid /bin/head
+#zpm list -f $PF 2>&1 | diagstdin
+skiponfail 1 "can't create $pkgid" || {
+ tryrun zpm install -R. -d local.db -f $PF 2>/dev/null
+ okexit "install with implicit package id"
+}
+