Strange output in pkg_info and missing ports in pkg_version

Matthew Seaman m.seaman at infracaninophile.co.uk
Tue Aug 26 03:40:13 PDT 2003


On Mon, Aug 25, 2003 at 10:25:10PM -0500, Manuel Rabade - MiG wrote:
> Hi everyone, i have FreeBSD 4.8 on my machine and everything seems
> very well with my packages database, but yesterday i realized that
> some XFree packages where missing in pkg_version, and they apperd
> in pkg_info but without the new line character, i will show you:
> 
> mig at mig:~$ pkg_info
> ...
> ...
> MuSE-0.8.1_1        Multiple Streaming Engine
> ORBit-0.5.17        High-performance CORBA ORB with support for the C language
> ORBit2-2.6.3        High-performance CORBA ORB with support for the C language
> OpenSSH-askpass-1.2.2.2001.02.24 Graphical password applet for entering SSH pass
> phrase
> XFree86-4.3.0,1     X11/XFree86 core distribution (complete, using mini/meta-po
> XFree86-FontServer-4.3.0_1 XFree86-4 font serverXFree86-Server-4.3.0_8 XFree86-4
>  X server and related programsXFree86-clients-4.3.0_2 XFree86-4 client programs 
> and related filesXFree86-documents-4.3.0 XFree86-4 documentationXFree86-font100d
> pi-4.3.0 XFree86-4 bitmap 100 dpi fontsXFree86-font75dpi-4.3.0 XFree86-4 bitmap 
> 75 dpi fontsXFree86-fontCyrillic-4.3.0 XFree86-4 Cyrillic fontsXFree86-fontDefau
> ltBitmaps-4.3.0 XFree86-4 default bitmap fontsXFree86-fontEncodings-4.3.0 XFree8
> 6-4 font encoding filesXFree86-fontScalable-4.3.0 XFree86-4 scalable fontsXFree8
> 6-libraries-4.3.0_5 XFree86-4 libraries and headersXaw3d-1.5           A 3-D Ath
> ena Widget set that looks like Motif
> Xft-2.1.2           A client-sided font API for X applications
> aalib-1.4.r5_1      An ascii art library
> antiword-0.33       An application to display Microsoft(tm) Word files
> apache-1.3.28       The extremely popular Apache http server.  Very fast, very  

This was a bug in the ports system which resulted in newlines being
omitted from some of the package labels.  If I remember correctly it
happened quite soon after 5.0 came out, with the second try at making
a switch from a separate pkg_comment file to having a COMMENT=
variable in the Makefile.

I believe it's quite harmless -- all it does is screw up the output of
pkg_info(1), the installed ports themselves work just fine.

A very heavy-handed way of fixing this (and profilgate of CPU cycles),
would be to simply re-install all of the XFree86 packages:

    # portupgrade -fvi 'XFree86*'

However, I think you might be able to solve the problem a lot more
simply, just by adding a newline character at the end of the +COMMENT
files in /var/db/pkg/{pkgname} -- eg. for the core XFree86
distribution, that would be:

    /var/db/pkg/XFree86-4.3.0,1/+COMMENT

A quick way of doing that is:

    # cd /var/db/pkg
    # perl -ni.bak -e 'chomp; print "$_\n";' XFree86-*/+COMMENT

Obviously, proceed with caution, make sure you have backups, yadda,
yadda. Remember to delete the .bak files when you're done.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030826/ffbd0dd2/attachment.bin


More information about the freebsd-questions mailing list