Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Sep 2009 11:37:46 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Jos Chrispijn <kernel@webrz.net>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Perl updates
Message-ID:  <4AACCB7A.2050106@infracaninophile.co.uk>
In-Reply-To: <4AACBF63.8020304@webrz.net>
References:  <4AACBF63.8020304@webrz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigE5FF4F0C961CE41ACA647A9B
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

Jos Chrispijn wrote:
> Can someone explain why we have to run an update batch in order to have=
=20
> all Perl related programs running with this update? Wouldn't it be=20
> better to upgrade Perl and have all programs use it as it hadn't been=20
> updated at all?

You're talking about the update of lang/perl5.10 from perl-5.10.0
to perl-5.10.1 ?

The reason you need to run perl-after-upgrade is because perl library
modules are stored in directory trees which encode the perl version numbe=
r.
perl-after-upgrade basically moves installed modules from

   /usr/local/lib/perl5/site_perl/5.10.0=20

to

   /usr/local/lib/perl5/site_perl/5.10.1

plus it fixes up all of the pkg-plists and various other places where
the directory path is embedded.  Alternatively you could just re-install
every single perl module on the system, plus any other ports that depend
on perl, but that's going to be the majority of the software on your mach=
ine
and perl-after-upgrade is a lot quicker.

Even so, ports that embed a perl interpreter -- ie. that dynamically link=

against libperl.so -- will need to be recompiled, to account for libperl.=
so
now being in a different location.  There aren't too many of these:
net-mgmt/net-snmp and www/mod_perl{,2} are probably the most commonly
encountered.  One of the functions of perl-after-upgrade is to tell you w=
hat
packages need to be rebuilt because of this.

Why isn't perl-after-upgrade run automatically?  Two reasons. Firstly, th=
e
ports system cannot itself distinguish what updates would require
perl-after-upgrade to be run:  when updating, the mechanism is to delete =
the
old package and then install the new one as if de-novo.  The newly instal=
led
package has no information about what older version of itself it is repla=
cing,
if any.

Secondly, you can't make perl-after-upgrade clever enough to deal with al=
l
conceivable corner cases.  Other than by enforcing particular usage rules=

on how individual admins manage their perl installations -- a policy that=

is manifestly *not the BSD way* -- this is unfeasible.  Given that we hol=
d that
it is in the gift of the individual admin to decide how to manage their s=
ystems,
there have to be stages somewhere that involve the admin making a conciou=
s
decision about what to do.  Running perl-after-upgrade is one of those po=
ints.

Lastly, just to note that if the upgrade is across a significantly large =
change
in version number: eg from perl-5.8 to perl-5.10, then any dynamically lo=
aded
compiled extension modules (see perlxs(1)) will have to be recompiled as =
the
ABI is not guaranteed to be kept the same in that case.  Unfortunately,
distinguishing modules that use perlxs from pure perl modules is not some=
thing
the ports system is currently capable of, so the upgrade instructions the=
re are
"rebuild everything that depends on perl".

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
                                                  Kent, CT11 9PW


--------------enigE5FF4F0C961CE41ACA647A9B
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.13 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREIAAYFAkqsy4AACgkQ8Mjk52CukIxC7wCggv5Sa2FPophn6ClWxEHFISQC
Wm0AniKl6zJTszExwppq19OdVaEt5a8K
=x02N
-----END PGP SIGNATURE-----

--------------enigE5FF4F0C961CE41ACA647A9B--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AACCB7A.2050106>