keeping a (maximally) clean active tree

paul beard paulbeard at gmail.com
Fri Dec 7 10:09:49 PST 2007


On 12/5/07, Ryan Schmidt <ryandesign at macports.org> wrote:
>
> I agree here again. You should not have to force anything in normal
> use. But you currently do, to uninstall old versions of software on
> which other software depends. Discussion of how this situation could
> be improved would probably be welcomed on the macports-dev list.
>

is there a reason not to make what we now use as "-f" the default
behavior? If I use "port upgrade foo" I expect foo to be upgraded to
the latest version. the use of "upgrade" implies that I have an
existing version that may be out of date and if it is, I want it
upgraded.

I realize, in circumstances like the gettext issue mentioned above,
that can hose things up, but that could be something is flagged in a
Portfile that might display a message like:

####
Installed port foo 0.6-7,1 is superceded by foo 0.7. foo 0.7 is
incompatible with installed ports
bar 1.1
baz 0.9-1
quux 0.2-3,1_3

To upgrade foo correctly, please uninstall the ports that depend on
it, upgrade foo and reinstall the dependents.

####

here's a particularly hairy example from FreeBSD's UPDATING file:

20050201:
  AFFECTS: users of lang/perl5 and lang/perl5.8
  AUTHOR: tobez at FreeBSD.org

  lang/perl5 has been updated to 5.6.2, and lang/perl5.8 has been
  updated to 5.8.6. you should update everything depending on perl, that
  is:

    * first, upgrade your perl installation (use either lang/perl5 or
      lang/perl5.8, the latter being recommended);
    * for FreeBSD 4.X, run "use.perl port", so that the system knows you
      have 5.8.6 or 5.6.2; this step is not needed on FreeBSD 5.X and
      FreeBSD -CURRENT;
    * run some magic incantations to upgrade all ports depending on perl,
      that is run something like :
      portupgrade -f `(pkg_info -R perl-5\* |tail +4; \
        find /usr/local/lib/perl5/site_perl/5.[68].[1245] -type f -print0 \
        | xargs -0 pkg_which -fv | sed -e '/: ?/d' -e 's/.*: //')|sort -u`
      This is likely to fail for a few ports, you'll have to upgrade them
      afterwards by hand.

Personally, I would have this be dumped out to the console when an
upgrade matches the date and version that this applies to. But that's
cuz I am too lazy/absent-minded to read UPDATING as often as I should.


-- 
Paul Beard / www.paulbeard.org/
<paulbeard at gmail.com/paulbeard at gmail.com>


More information about the macports-users mailing list