portmaster [was: New /bin/sh based script to manage ports]

David J. Weller-Fahy dave-lists-freebsd-ports at weller-fahy.com
Tue Feb 21 09:42:35 PST 2006


* Hans Lambermont <hans at lambermont.dyndns.org> [2006-02-20 21:43 +0100]:
> > David J. Weller-Fahy wrote:
> > > Hrm... would something like the attached script be sufficient?  it
> > > outputs a tree-like view of what will be updated.  It's not very
> > > complex, and doesn't take into account things like removing ports
> > > already ouput from any future output, but it works for me.
>
> Nice work ! The output grows very quicky with the missing hash-like
> filter. Here's a snippet of the well over 1000 lines of output I get:
>
> [snip output]

Thanks!  Yes, it does grow fairly rapidly.

> Is there a way to implement a perl-like hash filter in sh land to
> clean this up ?

Hrmmm...  IIUC then changing the output from:
#v+
>ctorrent-1.3.4_1::ctorrent-1.3.4_2
>ca-roots-1.1::ca-roots-1.2
>ldconfig_compat-1.0_5::ldconfig_compat-1.0_6
>perl-5.8.7_2::perl-5.8.8
>p5-Net-DNS-0.55::p5-Net-DNS-0.56
:>perl-5.8.7_2::perl-5.8.8
::>perl-5.8.7_2::perl-5.8.8
::>perl-5.8.7_2::perl-5.8.8
:::>perl-5.8.7_2::perl-5.8.8
::>perl-5.8.7_2::perl-5.8.8
>samba-3.0.21a,1::samba-3.0.21b,1
::>perl-5.8.7_2::perl-5.8.8
:::>perl-5.8.7_2::perl-5.8.8
::::>perl-5.8.7_2::perl-5.8.8
:::>perl-5.8.7_2::perl-5.8.8
:>perl-5.8.7_2::perl-5.8.8
::>perl-5.8.7_2::perl-5.8.8
:::>perl-5.8.7_2::perl-5.8.8
::>perl-5.8.7_2::perl-5.8.8
>w3m-0.5.1_3::w3m-0.5.1_4
#v-

To output like:
#v+
>ctorrent-1.3.4_1::ctorrent-1.3.4_2
>ca-roots-1.1::ca-roots-1.2
>ldconfig_compat-1.0_5::ldconfig_compat-1.0_6
>perl-5.8.7_2::perl-5.8.8
>p5-Net-DNS-0.55::p5-Net-DNS-0.56
>samba-3.0.21a,1::samba-3.0.21b,1
>w3m-0.5.1_3::w3m-0.5.1_4
#v-

Would satisfy the above requirement.  In other words, any port that has
already been shown would not be shown again.

> As a next step to such a filter I would suggest to reverse the
> dependency output, so that the build order gets shown.

Ok, so instead of printing:
#v+
>samba-3.0.21a,1::samba-3.0.21b,1
>w3m-0.5.1_3::w3m-0.5.1_4
:>boehm-gc-6.6_1::boehm-gc-6.6_2
::>libtool-1.3.5_1::libtool-1.3.5_2
#v-

The output should be (ignoring samba dependencies):
#v+
>samba-3.0.21a,1::samba-3.0.21b,1
::>libtool-1.3.5_1::libtool-1.3.5_2
:>boehm-gc-6.6_1::boehm-gc-6.6_2
>w3m-0.5.1_3::w3m-0.5.1_4
#v-

To accurately reflect the build order, correct?

> What do you think of this ?

It makes sense, assuming that I understand your intent.

Let me know if I do, and if not, then we'll try to reach understanding.
;]

Regards,
-- 
dave [ please don't CC me ]


More information about the freebsd-ports mailing list