determining the how and why of a port dependencies

Bradley Giesbrecht pixilla at macports.org
Sat Mar 21 12:49:35 PDT 2015


On Mar 21, 2015, at 12:03 PM, René J.V. Bertin <rjvbertin at gmail.com> wrote:

> On Saturday March 21 2015 10:46:07 Bradley Giesbrecht wrote:
> 
> Hi,
> 
>> I use sed in a script and am open to something easier:
>> https://svn.macports.org/repository/macports/users/pixilla/scripts/mp-rdeps-grid
> 
> Impressive :)
> 
> Starting from the end seems a bit simpler, and also should cater for any depth. I haven't (yet) figured out how to *not* replace and then restore the 1st '  ' on each line, but that may not even be possible:
> 
> `port -q rdeps "$@" | sed -e '/^-/d' -e 's/   \([^ ]\)/ \| \1/g' -e 's/  /\. /g' -e 's/^\./ /'`
> 
> Why do you need the first pattern, removing lines that start with a dash?

Not sure, written a while ago, probably when the pattern contains many ports they are separated by "--" and I was not interested in the separation.

Here it is without, perhaps this is better:
port -q rdeps dependentof:zlib | sed -e 's/  /\.\./g' -e 's/^\.\./  /g' -e 's/\.\./\. /g' -e 's/\. \([^\.]\)/\| \1/g'


Regards,
Bradley Giesbrecht (pixilla)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20150321/6c7136cb/attachment.sig>


More information about the macports-dev mailing list