New /bin/sh based script to manage ports

Doug Barton dougb at FreeBSD.org
Sat Feb 4 05:30:18 PST 2006


Panagiotis Astithas wrote:
> Doug Barton wrote:
>> Panagiotis Astithas wrote:
>>
>>> Can portmaster be used to do something like 'portupgrade -rf gnutls'
>>> (i.e. rebuild all dependent applications), like it is often requested in
>>> UPDATING?
>>
>> Thanks for this suggestion. I just added this feature, and updated the
>> web
>> page.
>>
>> http://dougbarton.us/portmaster.html
> 
> Thank you! Now, while working towards replacing portupgrade with
> portmaster in my daily system maintenance

Thanks for giving this a try! This kind of feedback is very valuable.

> I encountered a couple of other issues:
> 
> % portmaster -aiv
> ===>>> Starting check of installed ports for available updates
> grep: /var/db/pkg/pkgdb.db/+CONTENTS: Not a directory
> ===>>> Checking installed port: birda-1.3
> ===>>> Checking installed port: ca-roots-1.1
> ===>>> Checking installed port: cabextract-1.1
> ===>>> Checking installed port: cscope-15.5_1
> ===>>> Checking installed port: cvsup-without-gui-16.1h_2
> ===>>> Checking installed port: freebsd-update-1.6_2
> ===>>> Checking installed port: hcidump-1.5.1
> ===>>> Checking installed port: iftop-0.16_1
> ===>>> Checking installed port: iwi-firmware-2.4_2
> ===>>> Checking installed port: last.fm-player-1.0.3
> 
> ===>>> This port has been deleted:
> ===>>> Aborting update
> 
> The first grep error comes from portupgrade, which creates a pkgdb.db
> file in that directory.

Well that's just rude!  :)

> Can portmaster be smart enough to skip that, or
> even better, not consider regular files (i.e. not directories) at all?

Yes, that's easily done. I just uploaded a new version that fixes this
issue, and I tested the other instances of 'grep blah $pdb/*/+CONTENTS' to
make sure they are safe. As a side effect of this check it dawned on me that
I could remove some old instances of -r in the grep command lines that are
no longer necessary, so now the whole script is a tiny bit faster too.

> The seconf error comes from my installation of a package that does not
> come from a port (last.fm-player-1.0.3). I installed it directly from
> the vendor's site (http://last.fm). Can portmaster not error when
> encountering such packages, but rather just produce a warning?

Hrrrm.... this situation is tougher to handle, because there are a lot more
variables. It would be very useful if you could tar up
/var/db/pkg/last.fm-player-1.0.3 and send it to me if you're comfortable
doing that (I don't need the software, just the metadata). If I can see what
is/isn't in the +CONTENTS file of that package I can have a better idea how
to work around this.


Thanks again,

Doug

-- 

    This .signature sanitized for your protection


More information about the freebsd-ports mailing list