I've run into an odd problem where portinstall seems to want to double-install a package when portinstall is run from inside a bash script. The case I ran into was trying to install the postgres84-server port. In the dependencies is devel/pkg-config. When run from inside a shell script, portinstall tries to install pkg-config a second time after the postgres install is complete. If I run it outside a shell script (from my prompt) it works fine.
I ran into this using my personal environment and sudo, but I've repeated it with a bare tcsh login as well as a direct login to root's account from the console, so I'm confident this isn't due to interference from something in my environment. I can work around this by installing pkg-config directly before installing postgres, but thought this was odd enough to warrant an email to the list. Repeatability is trivial on a freshly installed 8.0-RELEASE as well as on 8.2-RELEASE-p2 system with an up-to-date ports tree. > cat >> testscript <<EOF #!/usr/local/bin/bash portinstall databases/postgresql84-server EOF > chmod a+x testscript > sudo ./testscript I've trimmed the config/cc/etc output from a log of my shell and included it below so that the order of operations can be seen. [Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 22 packages found (-3 +0) (...) done] [Gathering depends for databases/postgresql84-server ............... done] ---> Installing 'postgresql-client-8.4.8' from a port (databases/postgresql84-client) ---> Building '/usr/ports/databases/postgresql84-client' ===> Cleaning for libxml2-2.7.8_1 ===> Cleaning for pkg-config-0.25_1 ===> Cleaning for postgresql-client-8.4.8 ===> Vulnerability check disabled, database not found ===> License check disabled, port has not defined LICENSE ===> Found saved configuration for postgresql-client-8.4.8 ===> Extracting for postgresql-client-8.4.8 => SHA256 Checksum OK for postgresql/postgresql-8.4.8.tar.bz2. ===> Patching for postgresql-client-8.4.8 ===> Applying FreeBSD patches for postgresql-client-8.4.8 ===> postgresql-client-8.4.8 depends on executable: gmake - found ===> postgresql-client-8.4.8 depends on shared library: xml2.5 - not found ===> Verifying install for xml2.5 in /usr/ports/textproc/libxml2 ===> Vulnerability check disabled, database not found ===> License check disabled, port has not defined LICENSE ===> Extracting for libxml2-2.7.8_1 => SHA256 Checksum OK for gnome2/libxml2-2.7.8.tar.gz. ===> Patching for libxml2-2.7.8_1 ===> Applying FreeBSD patches for libxml2-2.7.8_1 ===> libxml2-2.7.8_1 depends on executable: gmake - found ===> libxml2-2.7.8_1 depends on executable: pkg-config - not found ===> Verifying install for pkg-config in /usr/ports/devel/pkg-config ===> Vulnerability check disabled, database not found ===> License check disabled, port has not defined LICENSE ===> Extracting for pkg-config-0.25_1 => SHA256 Checksum OK for gnome2/pkg-config-0.25.tar.gz. ===> Patching for pkg-config-0.25_1 ===> Applying FreeBSD patches for pkg-config-0.25_1 ===> pkg-config-0.25_1 depends on executable: gmake - found ===> Configuring for pkg-config-0.25_1 ===> Building for pkg-config-0.25_1 ===> Installing for pkg-config-0.25_1 ===> Generating temporary packing list ===> Checking if devel/pkg-config already installed ===> Compressing manual pages for pkg-config-0.25_1 ===> Registering installation for pkg-config-0.25_1 ===> Returning to build of libxml2-2.7.8_1 ===> libxml2-2.7.8_1 depends on shared library: iconv.3 - found ===> Configuring for libxml2-2.7.8_1 ===> Building for libxml2-2.7.8_1 ===> Installing for libxml2-2.7.8_1 ===> libxml2-2.7.8_1 depends on executable: pkg-config - found ===> Generating temporary packing list ===> Checking if textproc/libxml2 already installed ===> Compressing manual pages for libxml2-2.7.8_1 ===> Running ldconfig ===> Registering installation for libxml2-2.7.8_1 ===> Returning to build of postgresql-client-8.4.8 ===> postgresql-client-8.4.8 depends on shared library: intl - found ===> Configuring for postgresql-client-8.4.8 ===> Building for postgresql-client-8.4.8 ===> Installing for postgresql-client-8.4.8 ===> postgresql-client-8.4.8 depends on shared library: xml2.5 - found ===> postgresql-client-8.4.8 depends on shared library: intl - found ===> Generating temporary packing list ===> Checking if databases/postgresql84-client already installed ===> Compressing manual pages for postgresql-client-8.4.8 ===> Running ldconfig ===> Registering installation for postgresql-client-8.4.8 ===> Cleaning for libxml2-2.7.8_1 ===> Cleaning for pkg-config-0.25_1 ===> Cleaning for postgresql-client-8.4.8 [Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 25 packages found (-0 +3) ... done] ---> Installing 'pkg-config-0.25_1' from a port (devel/pkg-config) ---> Building '/usr/ports/devel/pkg-config' ===> Cleaning for pkg-config-0.25_1 ===> Vulnerability check disabled, database not found ===> License check disabled, port has not defined LICENSE ===> Extracting for pkg-config-0.25_1 => SHA256 Checksum OK for gnome2/pkg-config-0.25.tar.gz. ===> Patching for pkg-config-0.25_1 ===> Applying FreeBSD patches for pkg-config-0.25_1 ===> pkg-config-0.25_1 depends on executable: gmake - found ===> Configuring for pkg-config-0.25_1 === configuring in glib-1.2.10 (/usr/ports/devel/pkg-config/work/pkg-config-0.25/glib-1.2.10) ===> Building for pkg-config-0.25_1 ===> Installing for pkg-config-0.25_1 ===> Generating temporary packing list ===> Checking if devel/pkg-config already installed ===> pkg-config-0.25_1 is already installed You may wish to ``make deinstall'' and install this port again by ``make reinstall'' to upgrade it properly. If you really wish to overwrite the old port of devel/pkg-config without deleting it first, set the variable "FORCE_PKG_REGISTER" in your environment or the "make install" command line. *** Error code 1 Stop in /usr/ports/devel/pkg-config. *** Error code 1 Stop in /usr/ports/devel/pkg-config. ** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portinstall20110613-33090-gl4acg-0 env make reinstall ** Fix the installation problem and try again. ---> Skipping 'textproc/libxml2' because a requisite port 'devel/pkg-config' failed (specify -k to force) ---> Skipping 'databases/postgresql84-server' because a requisite port 'textproc/libxml2' failed (specify -k to force) ** Listing the failed packages (-:ignored / *:skipped / !:failed) ! devel/pkg-config (install error) * textproc/libxml2 * databases/postgresql84-server _______________________________________________ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"