[MacPorts] #21072: Cannot force a change to +universal

Ryan Schmidt ryandesign at macports.org
Fri Sep 4 10:39:05 PDT 2009


On Sep 4, 2009, at 11:55, Michael_google gmail_Gersten wrote:
>
> For example, is there any way to get a full list of the dependencies
> needed for a given package,

port-rdeps does this.

http://trac.macports.org/browser/contrib/port-rdeps/

For example, the dependencies of php5:


$ port-rdeps -r php5
Dependencies of php5:
   gsed
     gettext
       libiconv
         gperf
       ncurses
         ncursesw
       expat
   libtool
     automake
       perl5
         perl5.8
       autoconf
         m4
         help2man
           p5-locale-gettext
   libxml2
     zlib
   bzip2
   mhash
   pcre
     readline
   apache2
     apr
     apr-util
       db46
       sqlite3
     openssl
   pkgconfig
   autoconf213
     gawk
$


> separated into "These are installed (and
> may be upgraded)" and "These are not installed (and will cause an
> error if you try to upgrade, but will install without problem)"?

Not directly, but you can use port-rdeps in a clever series of pipes  
and subshells to achieve this. For example, here I echo the  
dependencies of php5 that I already installed:


$ port echo installed and \( $(port-rdeps -r php5 | sed 1d) \)
autoconf                       @2.64_2
automake                       @1.11_0+universal
bzip2                          @1.0.5_2+darwin+universal
expat                          @2.0.1_0+universal
gettext                        @0.17_4+universal
gperf                          @3.0.4_0+universal
help2man                       @1.36.4_1+universal
libiconv                       @1.13_0+universal
libtool                        @2.2.6a_0+universal
libxml2                        @2.7.3_0+universal
m4                             @1.4.13_0+universal
mhash                          @0.9.9.9_0+universal
ncurses                        @5.7_0+darwin_10+universal
ncursesw                       @5.7_0+darwin_10+universal
openssl                        @0.9.8k_0+darwin+universal
p5-locale-gettext              @1.05_0
pcre                           @7.9_0+universal
perl5                          @5.8.9_0
perl5.8                        @5.8.9_3
pkgconfig                      @0.23_1+universal
readline                       @6.0.000_1+darwin+universal
zlib                           @1.2.3_2+universal
$


And here, the dependencies of php5 that are not installed on my system:


$ port echo not installed and \( $(port-rdeps -r php5 | sed 1d) \)
apache2
apr
apr-util
autoconf213
db46
gawk
gsed
sqlite3
$


Instead of "port echo" I could have used any other port command, such  
as "port install" or "port upgrade", and I could add variants at the  
end. I already have the universal variant selected for all the  
installed dependencies of php5, but if I hadn't, I could rebuild them  
with that variant by using (I think -- I haven't tested):


port upgrade --enforce-variants installed and \( $(port-rdeps -r php5  
| sed 1d) \) +universal





More information about the macports-dev mailing list