crufty old versions [was Re: (no subject)]

Chris Waterson waterson at maubi.net
Tue Jul 10 22:10:22 PDT 2007


On Jul 10, 2007, at 8:59 PM, Ryan Schmidt wrote:

>
> On Jul 10, 2007, at 18:49, Chris Waterson wrote:
>
>> Hi there!  I've been using macports for some time now, and one thing
>> that is frustrating is the fact that "port upgrade" leaves crufty old
>> variants behind.
>
> You mean: crufty old versions behind. "variants" has a different  
> meaning for MacPorts.

Thank you for the quick response...you're right: I meant "versions".

>> I've tried:
>>
>>   port -uR upgrade outdated
>>
>> in the hopes that "-u" would "uninstall non-active ports when
>> upgrading and uninstalling" (as claimed by the man page) and that
>> combining it with "-R" would "also upgrade dependents" (by which I  
>> was
>> hoping "upgrade" meant "rebuild with the newer variant).
>
> Here I don't know what you mean by "variant". If you're talking  
> about variants in the way that MacPorts defines that term, then  
> "upgrade" will only retain the set of variants with which you  
> originally installed the port. If you now want to have a different  
> set of variants on a port, then your only option is to completely  
> uninstall (or at least deactivate) the existing port, and then  
> install it with the variants you now want.

Again, my confusion.  I meant "version" where I said "variant".

> I wasn't familiar with -R. You're right, I see it's in the manpage.  
> But MacPorts follows dependencies by default, so I don't think you  
> need -R.
>
>> This doesn't seem to be the case, but leads to lots of extra warnings
>> during my upgrade, for example, the following (five times, or so):
>>
>>   Error: Uninstall sqlite3 3.3.17_0+darwin_8 failed: Please  
>> uninstall the ports that depend on sqlite3 first.
>>   --->  Unable to uninstall sqlite3 3.3.17_0+darwin_8, the  
>> following ports depend on it:
>>   --->    apr-util
>>
>> At which point, for each piece of cruft, I wander through all the
>> dependents by hand, uninstall each, then uninstall the old variant,
>> then re-install each dependent.
>>
>> Surely I am doing something wrong.  Can someone vend me a clue?
>
> I recommend you do the following (substituting any other port name  
> for "sqlite3" as desired):
>
> sudo port -u upgrade sqlite3
>
> If you encounter an error that says it's required for other ports,  
> then force the upgrade:
>
> sudo port -ufn upgrade sqlite3
>
> If other ports depend on sqlite3, then you need to force (-f) the  
> uninstall. However, then you'll also want the nonrecursive flag (- 
> n), else MacPorts will rebuild all of sqlite3's dependencies too,  
> possibly even multiple times, which is just a waste of your time.  
> The latter is a bug:
>
> http://trac.macosforge.org/projects/macports/ticket/10827
>
> Since you normally do want MacPorts to follow dependencies if  
> necessary, you should always first try just upgrading with -u, and  
> only if that fails, switch to -unf.
>
>
> The fact that apr-util is listed five times in your output instead  
> of once is also a bug:
>
> http://trac.macosforge.org/projects/macports/ticket/8763

Okay, thanks for the pointers.

I did take a stab at "port -ufn upgrade", but that seemed to *still*  
not get rid of the dependency.  As the below trace shows:

1. I can't uninstall gd2 @2.0.34_0 because gnuplot depends on it.

2. Rebuilding either gd2 or gnuplot does not clear the dependency.

3. But the dependency is (seems?) false, since I can "port uninstall - 
f gd2 @2.0.34_0" and gnuplot will still run.  I suppose it's possible  
that gd2 is dlopen'd and gnuplot will fail splendidly later.

Anyway, it seems like there might just be some issues with dependency  
tracking.

Thanks for your help!

chris



~$ sudo port uninstall gd2
--->  The following versions of gd2 are currently installed:
--->    gd2 @2.0.34_0
--->    gd2 @2.0.35_0 (active)
Error: port uninstall failed: Registry error: Please specify the full  
version as recorded in the port registry.
~$ sudo port uninstall gd2 @2.0.34_0
--->  Unable to uninstall gd2 2.0.34_0, the following ports depend on  
it:
--->    gnuplot
Error: port uninstall failed: Please uninstall the ports that depend  
on gd2 first.
~$ sudo port -ufn upgrade gd2
--->  Configuring gd2
--->  Building gd2 with target all
--->  Staging gd2 into destroot
--->  Packaging tgz archive for gd2 2.0.35_0
--->  Unable to uninstall gd2 2.0.35_0, the following ports depend on  
it:
--->    gnuplot
Warning: Uninstall forced.  Proceeding despite dependencies.
--->  Deactivating gd2 2.0.35_0
--->  Uninstalling gd2 2.0.35_0
--->  Installing gd2 2.0.35_0
--->  Activating gd2 2.0.35_0
--->  Cleaning gd2
~$ sudo port uninstall gd2
--->  The following versions of gd2 are currently installed:
--->    gd2 @2.0.34_0
--->    gd2 @2.0.35_0 (active)
Error: port uninstall failed: Registry error: Please specify the full  
version as recorded in the port registry.
~$ sudo port uninstall gd2 @2.0.34_0
--->  Unable to uninstall gd2 2.0.34_0, the following ports depend on  
it:
--->    gnuplot
Error: port uninstall failed: Please uninstall the ports that depend  
on gd2 first.
~$ sudo port uninstall gnuplot
--->  Unable to uninstall gnuplot 4.2.0_0, the following ports depend  
on it:
--->    octave
Error: port uninstall failed: Please uninstall the ports that depend  
on gnuplot first.
~$ sudo port -ufn upgrade gnuplot
--->  Fetching gnuplot
--->  Verifying checksum(s) for gnuplot
--->  Extracting gnuplot
--->  Applying patches to gnuplot
--->  Configuring gnuplot
--->  Building gnuplot with target all
--->  Staging gnuplot into destroot
--->  Packaging tgz archive for gnuplot 4.2.0_0
--->  Unable to uninstall gnuplot 4.2.0_0, the following ports depend  
on it:
--->    octave
Warning: Uninstall forced.  Proceeding despite dependencies.
--->  Deactivating gnuplot 4.2.0_0
--->  Uninstalling gnuplot 4.2.0_0
--->  Installing gnuplot 4.2.0_0
--->  Activating gnuplot 4.2.0_0
--->  Cleaning gnuplot
~$ sudo port uninstall gd2 @2.0.34_0
--->  Unable to uninstall gd2 2.0.34_0, the following ports depend on  
it:
--->    gnuplot
Error: port uninstall failed: Please uninstall the ports that depend  
on gd2 first.
~$ sudo port -f uninstall gd2 @2.0.34_0
--->  Unable to uninstall gd2 2.0.34_0, the following ports depend on  
it:
--->    gnuplot
Warning: Uninstall forced.  Proceeding despite dependencies.
--->  Uninstalling gd2 2.0.34_0
~$ gnuplot

         G N U P L O T
         Version 4.2 patchlevel 0
         last modified March 2007
         System: Darwin 8.10.1

         Copyright (C) 1986 - 1993, 1998, 2004, 2007
         Thomas Williams, Colin Kelley and many others

         Type `help` to access the on-line reference manual.
         The gnuplot FAQ is available from
                 http://www.gnuplot.info/faq/

         Send comments and help requests to  <gnuplot- 
info at lists.sourceforge.net>
         Send bug reports and suggestions to <gnuplot- 
bugs at lists.sourceforge.net>


Terminal type set to 'aqua'
gnuplot> quit
~$



More information about the macports-users mailing list