String repoURI = null;
if (getArgumentCount() == 2)
repoURI = args[1].getStringValue();
target = installAndDeployFromDb(pkgName, repoURI);
} else
target = deployment.undeploy(pkgName, context.getRepository());
return statusReport(target);
} catch (PackageException e) {
throw new XPathException(this, EXPathErrorCode.EXPDY001, e.getMessage());
} catch (IOException e) {
throw new XPathException(this, ErrorCodes.FOER0000, "Caught IO error while deploying expath archive");