portupgrade -af in FreeBSDupdate to 8.0

Chris Rees utisoft at gmail.com
Wed Jun 23 07:50:55 UTC 2010

On 23 June 2010 08:29, n dhert <ndhertbsd at gmail.com> wrote:
> in the process of upgrading 7.2 -> 8.0, the last step is to recompile all
> ports
> (section 24.2.3 of freebsd manual)
> # portupgrade -f ruby
> # rm /var/db/pkg/pkgdb.db
> # portugprade -f ruby18-bdb
> # rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db
> # portupgrade -af
> Did that for my 760 ports, but after 499 ports reinstalled (and 11 hours),
> it stopped

<snip />

> Why does it stop? Can it be avoided? Or can I make portupgrade -af start
> from where it got so far in the first run ?
> I could do # portupgrade -af  again, but this is again "everything" (11
> hours)...
> I noticed on a different system (with only 64 ports), that it stopped at
> lang/ruby18 there as well,
> and after again # portugprade -af (which then continued past lang/ruby18),
> it stopped a second time
> in the same manner at
>  --->  Reinstallation of databases/ruby-bdb ended at: Mon, 14 Jun 2010
> 13:01:25
>  +0200 (consumed 00:00:28)

AFAICR, portupgrade is written in Ruby, so strange things can happen
if you pull the carpet out from under it like that. Not really your

I suggest you look at the man page for pkg_glob, and look for the kind
of glob to supply for portupgrade; for example:

 The following command line arguments are supported:

     pkgname_glob        Specify one of these: a full pkgname, a pkgname with-
                         out version, or a shell glob pattern to match against
                         pkgnames or their origins in which you can use wild-
                         cards `*', `?', and `[..]', an extended regular
                         expression preceded by a colon `:' to match against
                         pkgnames or their origins, or a date range specifica-
                         tion preceded by either `<' or `>'.

So try

[chris at amnesiac]~% sudo portupgrade -f '<2010-06-22'

That should reinstall all the ports that were installed before yesterday.



More information about the freebsd-questions mailing list