Solved pkg update failure

When attempting to update bash due to the recent vulnerabilities, bash requires ports-mgmt/pkg to be updated first. When updating ports-mgmt/pkg via portupgrade or a make install from ports, it fails the build upon installation:

Code:
--->  Deinstalling 'pkg-1.2.7'
--->  Preserving /usr/local/lib/libpkg.so.1 as /usr/local/lib/compat/pkg/libpkg.so.1
[Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 225 packages found (-1 +0) (...) done]
--->  Installing the new version via the port
===>  Installing for pkg-1.3.8_2
===>   Registering installation for pkg-1.3.8_2
pkg-static: PACKAGESITE in pkg.conf is no longer supported.  Convert to the new repository style.  See pkg.conf(5)
pkg-static: Cannot parse configuration file!
*** [fake-pkg] Error code 70

Stop in /usr/ports/ports-mgmt/pkg.
*** [/var/ports/usr/ports/ports-mgmt/pkg/work/.install_done.pkg._usr_local] Error code 1

Stop in /usr/ports/ports-mgmt/pkg.
*** [reinstall] Error code 1

Stop in /usr/ports/ports-mgmt/pkg.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20141003-47611-1w5uv6f env UPGRADE_TOOL=portupgrade UPGRADE_PORT=pkg-1.2.7 UPGRADE_PORT_VER=1.2.7 make reinstall
--->  Restoring the old version
System is: 9.2-RELEASE-p10 FreeBSD 9.2-RELEASE-p10 #0 amd64

Is anyone else having this type of issue updating pkg?
 
Re: pkg update failure

Code:
PACKAGESITE in pkg.conf is no longer supported.  Convert to the new repository style.

Delete this in pkg.conf.
 
Re: pkg update failure

Thanks, that was a good lead - the errors have been cleared. I deleted the packagesite line from /usr/local/etc/pkg.conf

However, builds would seem to silently end without actually building. I went over to ports-mgmt/portmaster, then make install clean to see if that would reveal the next clue. It did:

Code:
===>   Registering installation for portmaster-3.17.7
If you want to switch to the new pkg(8) format, and have not already done so,
there are some extra 1-time steps to take:

    Enable PKGNG as your package format:

        # echo 'WITH_PKGNG=yes' >> /etc/make.conf

    Then convert your /var/db/pkg database to the new pkg format:

        # pkg2ng

Followed these instructions, let it churn, the system is settled in order. I finished up by running portupgrade pkg once more, which completed the install. Finally, bash() was upgraded successfully.
 
I just wanted to add for anyone else looking for this issue as SOLVED, since the above didn't apply in my case:

I didn't have portupgrade installed and nothing would build because of the pkg version being out of date after I updated the ports tree with portsnap. I got libcrypto.la errors and pkg wouldn't build with make deinstall reinstall. I converted the pkg db with pkg2ng, then ran:

pkg install pkg

...and that's a bingo! It upgraded the pkg version successfully, and then I was able to use make reinstall after that on the other ports I was trying to build (php56, php56-extension, mod_php56).
 
Back
Top