8.0 portupgrade -af: CONTINUE

So, I have around 678 ports installed.
I've run:
Code:
portupgrade -af
, to rebuild them all, as I migrated from 7.2 to 8.0

It stopped at ruby18-bdb-0.6.5_1 port as it complained about some bad ports db format.
I've rebuilt it by hand.

Now I need to continue from port 216, which was ruby18-bdb!

Luckily for me I did used script command to record progress.
From generated file I did:
Code:
cat progress_file | grep "===>  Installing for " > built_ports.txt

Then I replaced string "===> Installing for " with ""(empty string), in order to get file, with list of already rebuilt ports.
Format is one port_version on each line, like:
Code:
...
gnome-menus-2.28.0.1
patch-2.6
exiv2-0.18_1,1
automake-1.9.6_3
gawk-3.1.6_1
qt4-xml-4.5.3
...
So how would I use that file to continue where I stopped?

Something like using exclude option? :stud
Code:
portupgrade -af -x ... something
 
Get the list of ports you still need to build from that progress file, put those in another file, and then run

[cmd=]cat thatfile | tr '\n' ' ' > newfile[/cmd]

Edit newfile, put [cmd=]portmaster -f [/cmd] before that single long line, and run it as a shell script ;)
 
If you know the approximate time, when you started updating your ports, you may also use this as a pkg_glob to portupgrade, for example:
Code:
portupgrade --batch -f "<= 2009-11-29 00:00:00 +0800"
 
http://www.daemonology.net/blog/2009-07-11-freebsd-update-to-8.0-beta1.html

The upgrade instructions say to follow these instructions when upgrading to 8.0.

Part of the instructions say to do this:

Step 7: Update ruby and delete portupgrade's package database (UPDATE 2009-09-08: this is not required when updating from 8.0-BETA3 or later to newer betas, release candidates, or 8.0-RELEASE):

Code:
portupgrade -f ruby\*
...
rm /var/db/pkg/pkgdb.db
I'm not entirely certain why this is necessary; but when performing major base system upgrades, portupgrade tends to get confused and think that its package database is corrupt. Rebuilding the ruby and ruby-bdb ports and then deleting the package database (which forces portupgrade to rebuild it) seems to make the problem go away.
 
DutchDaemon said:
Get the list of ports you still need to build from that progress file, put those in another file, and then run

[cmd=]cat thatfile | tr '\n' ' ' > newfile[/cmd]

Edit newfile, put [cmd=]portmaster -f [/cmd] before that single long line, and run it as a shell script ;)

portupgrade refuses(well it ignores), more than 1 port as argument
Same applies for exception "-x", where from ...-x portA portB portC, only portA will actually get excluded.

What I did was looking at man of portupgrade and done this:
Code:
# portupgrade -afy -x '>=2009-11-29 14:00'
After thinking, a bit, I knew I started upgrading ports around 2009-11-29 15:00, so used -1 hour as a safety measure.
That is exclude "-x", all ports built after 2009-11-29 14:00
And Voila!

PS: Sorry for a late reply, but it took more than a day, to rebuild all ports and use browser and it is not like I could post with lynx(I could actually) :p
 
mickey said:
If you know the approximate time, when you started updating your ports, you may also use this as a pkg_glob to portupgrade, for example:
Code:
portupgrade --batch -f "<= 2009-11-29 00:00:00 +0800"

Yeah, applied 'date approach' , day and a half ago.
Thanks anyway!

MissileSilo said:
http://www.daemonology.net/blog/2009-07-11-freebsd-update-to-8.0-beta1.html


The upgrade instructions say to follow these instructions when upgrading to 8.0.

Part of the instructions say to do this:

Step 7: Update ruby and delete portupgrade's package database (UPDATE 2009-09-08: this is not required when updating from 8.0-BETA3 or later to newer betas, release candidates, or 8.0-RELEASE):

Code:
portupgrade -f ruby\*
...
rm /var/db/pkg/pkgdb.db
I'm not entirely certain why this is necessary; but when performing major base system upgrades, portupgrade tends to get confused and think that its package database is corrupt. Rebuilding the ruby and ruby-bdb ports and then deleting the package database (which forces portupgrade to rebuild it) seems to make the problem go away.

I upgraded from 7.2, so yes, this is exactly where it stopped.
I then manually deleted *.db and rebuilt ruby, and then continued to build as replied above.
 
Seeker said:
portupgrade refuses(well it ignores), more than 1 port as argument
Same applies for exception "-x", where from ...-x portA portB portC, only portA will actually get excluded.
You will have to use multiple -x options, like -x portA -x portB -x portC.
Specifying -x portA portB portC could actually exclude portA, but include portB and portC, as they are not associated to the -x switch, when separated by whitespace.

But portupgrade should handle more than one pkg_glob being specified on the commandline, and I remember having used it with xargs already.
Seeker said:
What I did was looking at man of portupgrade and done this:
Code:
# portupgrade -afy -x '>=2009-11-29 14:00'
After thinking, a bit, I knew I started upgrading ports around 2009-11-29 15:00, so used -1 hour as a safety measure.
That is exclude "-x", all ports built after 2009-11-29 14:00
This should be equivalent to:
Code:
portupgrade -fy "< 2009-11-29 14:00"
 
mickey said:
You will have to use multiple -x options, like -x portA -x portB -x portC.
Trust me, that is exactly what I've been trying!
Only portA is excluded.


mickey said:
This should be equivalent to:
Code:
portupgrade -fy "< 2009-11-29 14:00"
Yeah, it would.;)

And..., as I see, you are good with portupgrade, so tell me...
What effect..., and how would it behave, if I would add:
Code:
--batch
, I also saw that it requires setting BATCH var in shell.
 
Seeker said:
Trust me, that is exactly what I've been trying!
Only portA is excluded.
Did you by any chance specify the -x options after the list of packages to update? For that will not work.

Seeker said:
And..., as I see, you are good with portupgrade, so tell me...
What effect..., and how would it behave, if I would add:
Code:
--batch
, I also saw that it requires setting BATCH var in shell.

Actually, specifying the --batch option to portupgrade should set the BATCH environment variable whilst performing the upgrades.

The effect is, that no configuration menus will pop up and require user intervention. The ports being upgraded will either use their default configuration options, or the ones previously saved during [cmd=""]make config[/cmd].

I quite dislike it, when I instruct my machine to perform a ports upgrade, go to sleep, get up 8 hrs later and have to face the fact, that my machine was sitting idle since 10 minutes after I got to sleep, cause it was waiting for me to choose some configuration options :p
 
One more reason to switch to portmaster, which gets the config screens out of the way right at the start ;)
 
mickey said:
Did you by any chance specify the -x options after the list of packages to update? For that will not work.
Well like this:
Code:
# portupgrade -af -x portA -x portB -x portC
and
Code:
# portupgrade -af -x portA portB portC
None worked. :p
mickey said:
Actually, specifying the --batch option to portupgrade should set the BATCH environment variable whilst performing the upgrades.

The effect is, that no configuration menus will pop up and require user intervention. The ports being upgraded will either use their default configuration options, or the ones previously saved during [cmd=""]make config[/cmd].

I quite dislike it, when I instruct my machine to perform a ports upgrade, go to sleep, get up 8 hrs later and have to face the fact, that my machine was sitting idle since 10 minutes after I got to sleep, cause it was waiting for me to choose some configuration options :p
Yeah, that is why for meta ports I use:
Code:
# make config-recursive
Well I'll use --batch, just as a safety measure for a massive portupgrade, then
 
Seeker said:
Well like this:
Code:
# portupgrade -af -x portA -x portB -x portC
and
Code:
# portupgrade -af -x portA portB portC
None worked. :p
The first form should work... i use something like this regularly:
Code:
portupgrade --batch -arR -x "*openoffice*" -x "*jdk*"
Currently my other machine does:
Code:
portupgrade --batch -O -f -x "*openoffice*" -x "jdk-*" "<= 2009-12-01 00:00:00"

Seeker said:
Yeah, that is why for meta ports I use:
Code:
# make config-recursive
Well I'll use --batch, just as a safety measure for a massive portupgrade, then

In the end, updating a port is another thing as installing a port. When I install something, I probably want to see the compile time options. When I am upgrading, it is safe to assume, I've already been there.

@Dutch Daemon:

portupgrade, portmaster, ... I don't see much of a difference here, other than different commandline flags and oh well ruby of course :e But I think none of these tools will solve the problems with the ports system that keep bothering me.
 
This exact same thing happened to me (upgrading from 7.2 -> 8.0) yesterday. It failed out at ruby with a corrupt pkgdb.db. I rebuilt the pkgdb.db, and it seemed to continue on just fine, although now that the installation is complete I'm having all kinds of missing library problems (application references the old libs which were removed with the final iteration of 'freebsd-update install'). I've been using portupgrade slowly but surely to get things back to working order...

Not to hijack your thread, but is there a way to identify which installed ports have failed library dependencies (for example: 'libcrypt.so.4 not found, php needs libcrypt.so.4" type errors)?
 
Change to several subdirectories
(/usr/local/lib, /usr/local,bin etc)
in each one run
Code:
ldd A* 
then
ldd B*
etc...
then ldd a*
ldd b* 
etc...
A bit tedious but that would find "?" binaries
that are stray, (so.) files too, and probably
"not founds" for ports that need upgrading. You
only have then to find out the portname for
the particular file
Code:
pkg_which (file)

That is how I remember the process anyway. I vaguely
recall someone posting a quicker way.
 
ecables said:
...
Not to hijack your thread, but is there a way to identify which installed ports have failed library dependencies (for example: 'libcrypt.so.4 not found, php needs libcrypt.so.4" type errors)?
You are more than welcome to hijack my thread.
Feel yourself like at home. ;)
 
I quite dislike it, when I instruct my machine to perform a ports upgrade, go to sleep, get up 8 hrs later and have to face the fact, that my machine was sitting idle since 10 minutes after I got to sleep, cause it was waiting for me to choose some configuration options
i do this and it is work fine for me :
Code:
portsnap -arC
switch -C will force to run menu config .
i was wonder if can i specify some config for some ports that they have not menu config like mysql-server in portupgrade or make.conf ?
 
Yeah, applied 'date approach' , day and a half ago.
Thanks anyway!

What kind of approaches are there besides date approach?
I updated from FreeBSD 7.2R-p4 to 8.0R and have tried to rebuild all installed packages.
 
Back
Top