bsdpan- to p5- migration

Matthew Seaman m.seaman at
Wed Jul 18 09:28:28 UTC 2007

Hash: SHA256

Peter Beckman wrote:
> On Tue, 17 Jul 2007, Scott Lambert wrote:

>> I've not personally messed with CPAN.  If the origins are correct,
>> then the HOLD_PKGS array in /usr/local/etc/pkgtools.conf is probably
>> what is preventing portupgrade from updating them.
>  Yes, it is, but I figured there was some reason that was done.  I of
>  course couldn't find the reason bsdpan-* were held, assuming the reason
>  was that you shouldn't upgrade bsdpan-* using portupgrade.

Perl modules installed via  CPAN/bsdpan don't have a valid PKGORIGIN
- -- that is, there isn't a directory in the ports tree for them.
That means that none of the usual ports management tools have a
mechanism for finding out if the package has any updates available,
or for installing an updated version of the package.

Of course, for the most part you can use the CPAN module to install
newer versions of  the packages, but this does not work in the way
that the rest of the ports system would expect -- you're likely to
end up with the new version of the module simply overwriting the
old one and both still registered in /var/db/pkg. Not a disaster,
but a chore to clean up, and with the potential for stray obsolete
files to cause subtle and hard to diagnose errors.

Most of the commonly used perl modules have a real p5- port in the
tree.  For best results use that one whenever it is available.  In
order to convert a bsdpan- package into a p5- package, you'ld need
to identify the corresponding port and use a command line something

 # portupgrade -o ports-mgmt/p5-FreeBSD-Portindex -f \

The hardest part in all this is establishing the connection between
the perl module 'FreeBSD::Portindex', the bsdpan package name
'bsdpan-FreeBSD-Portindex-1.9', the equivalent name from ports
'p5-FreeBSD-Portindex-1.9' and the origin directory within the ports
tree 'ports-mgmt/p5-FreeBSD-Portindex'. Most of the time swapping
prefix (p5- for bsdpan-) and dropping the version number will get
you the second half of the origin, but there are a few oddities
where the port origin and the package name don't correspond to the
names of the modules installed -- eg. www/p5-libwww which installs
Bundle::LWP (and hence a package name bsdpan-Bundle-LWP-5.805 if
installed from CPAN).  Deriving the package origin from the name
requires an up to date INDEX and a command line like so:

% cd /usr/ports
% make search name=FreeBSD-Portindex display=path
Path:   /usr/ports/ports-mgmt/p5-FreeBSD-Portindex

Port:   sysutils/p5-FreeBSD-Portindex
Moved:  ports-mgmt/p5-FreeBSD-Portindex
Date:   2007-02-05
Reason: Moved to a new category



- --
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP:     Ramsgate
                                                  Kent, CT11 9PW
Version: GnuPG v2.0.4 (FreeBSD)
Comment: Using GnuPG with Mozilla -


More information about the freebsd-ports mailing list