Fixing a Problematic Port

While trying to upgrade installed ports on a FreeBSD 4.9 STABLE machine, I encountered a problem with x11-fonts/libXft:

[Updating the pkgdb in /var/db/pkg ... - 125 packages found (-1 +0) (...) done]
---> Installing the new version via the port
===> Installing for libXft-2.1.6
===> libXft-2.1.6 depends on shared library: fontconfig.1 - found
===> libXft-2.1.6 depends on shared library: X11.6 - found
===> Generating temporary packing list
===> Checking if x11-fonts/libXft already installed
===> An older version of x11-fonts/libXft is already installed (Xft-2.1.2_1)
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 x11-fonts/libXft
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/x11-fonts/libXft.
*** Error code 1

Stop in /usr/ports/x11-fonts/libXft.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade6761.0 make reinstall
egrep: /var/db/pkg/libXft-2.1.5_1/+CONTENTS: No such file or directory
---> Restoring the old version
** Fix the installation problem and try again.
[Updating the pkgdb in /var/db/pkg ... - 126 packages found (-0 +1) . done]
** Listing the failed packages (*:skipped / !:failed)
! x11-fonts/libXft (libXft-2.1.5_1) (install error)
---> Packages processed: 0 done, 0 ignored, 0 skipped and 1 failed

I decided to use pkgdb -F to identify and fix problems:

janney:/var/db/pkg# pkgdb -F
---> Checking the package registry database
Duplicated origin: x11-fonts/libXft - Xft-2.1.2_1 libXft-2.1.5_1
Unregister any of them? [no] yes
Unregister Xft-2.1.2_1 keeping the installed files intact? [no] yes
-> libXft-2.1.5_1 is kept.
--> Saving the Xft-2.1.2_1's +CONTENTS file as /var/db/pkg/libXft-2.1.5_1/+CONTENTS.Xft-2.1.2_1
--> Unregistering Xft-2.1.2_1
--> Done.
[Updating the pkgdb in /var/db/pkg ... - 125 packages found (-1 +0) (...) done]
Stale dependency: firefox-0.8_4 -> Xft-2.1.2_1 (x11-fonts/libXft):
Fixed. (-> libXft-2.1.5_1)

Then I tried upgrading libXft again:

janney:/var/db/pkg# portupgrade -v libXft
---> Session started at: Tue, 27 Apr 2004 14:10:38 -0400
---> Upgrade of x11-fonts/libXft started at: Tue, 27 Apr 2004 14:10:42 -0400
---> Upgrading 'libXft-2.1.5_1' to 'libXft-2.1.6' (x11-fonts/libXft)
---> Build of x11-fonts/libXft started at: Tue, 27 Apr 2004 14:10:42 -0400
---> Building '/usr/ports/x11-fonts/libXft'
===> Cleaning for gettext-0.13.1_1
...edited...
===> Registering installation for libXft-2.1.6
===> Cleaning for gettext-0.13.1_1
===> Cleaning for gmake-3.80_2
===> Cleaning for imake-4.3.0_2
===> Cleaning for pkgconfig-0.15.0_1
===> Cleaning for freetype2-2.1.7_3
===> Cleaning for expat-1.95.7
===> Cleaning for fontconfig-2.2.2,1
===> Cleaning for XFree86-libraries-4.3.0_7
===> Cleaning for libXft-2.1.6
---> Removing the temporary backup files
---> Installation of x11-fonts/libXft ended at: Tue, 27 Apr 2004 14:11:42 -0400 (consumed 00:00:11)
---> Cleaning out obsolete shared libraries
[Updating the pkgdb in /var/db/pkg ... - 125 packages found (-0 +1) . done]
---> Upgrade of x11-fonts/libXft ended at: Tue, 27 Apr 2004 14:11:44 -0400 (consumed 00:01:02)
---> Listing the results (+:done / -:ignored / *:skipped / !:failed)
+ x11-fonts/libXft (libXft-2.1.5_1)
---> Packages processed: 1 done, 0 ignored, 0 skipped and 0 failed
---> Session ended at: Tue, 27 Apr 2004 14:11:46 -0400 (consumed 00:01:07)

It looks like it worked.

Popular posts from this blog

Zeek in Action Videos

MITRE ATT&CK Tactics Are Not Tactics

New Book! The Best of TaoSecurity Blog, Volume 4