Newbie portupgrade question

Hi friends, new FreeBSD user here, starting to really love FreeBSD and ports.

I did a portsnap fetch update, then ran [cmd=]portupgrade -a[/cmd] to update everything. I hit an error about having apache1.3 installed but apache2.x was required. So I force-deleted apache1.3 (pkg_delete -f) and proceeded to install apache22 from ports. Now resuming [cmd=]portupgrade -a[/cmd] I get a pkgdb warning (stale dependency) asking me to [cmd=]pkgdb -F[/cmd] I do that and it seems to delete several stale dependencies.

My question is, do I have to worry about this, is it normal or should I not have replaced apache1.3 with apache2.2? Has the pkgdb -F corrected it for, has it replaced the dependency with apache22?

here's my output:

Code:
potensol3# portupgrade -a
[Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 844 packages found (-1 +3) (...)... done]
Stale dependency: ImageMagick-6.6.7.10_1 --> apache-1.3.42 -- manually run 'pkgdb -F' to fix, or specify -O to force.
potensol3# pkgdb -F
--->  Checking the package registry database
Stale dependency: ImageMagick-6.6.7.10_1 -> apache-1.3.42 (www/apache13):
-> Deleted. (irrelevant)
Stale dependency: cups-base-1.4.6_3 -> apache-1.3.42 (www/apache13):
-> Deleted. (irrelevant)
Stale dependency: cups-pdf-2.5.1 -> apache-1.3.42 (www/apache13):
-> Deleted. (irrelevant)
Stale dependency: graphviz-2.26.3_3 -> apache-1.3.42 (www/apache13):
-> Deleted. (irrelevant)
Stale dependency: libxine-1.1.19_3 -> apache-1.3.42 (www/apache13):
-> Deleted. (irrelevant)
Stale dependency: phonon-xine-4.4.4 -> apache-1.3.42 (www/apache13):
-> Deleted. (irrelevant)
Stale dependency: php5-5.3.6 -> apache-1.3.42 (www/apache13):
-> Deleted. (irrelevant)
 
The default apache version for ports changed recently. If you don't set a specific version it will install the default.

Only do a portupgrade -a if you are absolutely sure there aren't any issues. Always read /usr/ports/UPDATING beforehand.
 
Those installed ports still showed a dependence on the now-missing apache13, so pkgdb just removed that dependence in the pkgdb database.

At this point, I recommend installing ports-mgmt/portmaster and using it instead of portupgrade. It doesn't need pkgdb but has a --check-depends option that does the equivalent. See Upgrading FreeBSD Ports for a short guide on upgrading ports.
 
The binary packages work well for almost everything with the ports available for a few specific items. That limits the number of ports that need updating to a manageable number.

I've had issues with all the portupgrading tools. Some could have been avoided with a careful reading of UPDATING but that requires a lot of effort when you have many ports. There were frequently items that bit me in surprising ways.

One common issue was when the port required a newer version of some random library(frequently not true). I would suddenly get into a cycle of dependencies where something would randomly break which worked before and more ports were needed to replace binary packages. Even more fun was when the port itself needed editing.

Perhaps the current ports system has eliminated errors?
 
Packages are ports, just one-size-fits-all ports that somebody else built on a system different from yours.

If you don't update often, and the default options fit your needs, packages can be fine.

If you do update often, use ports along with portmaster and it works fine.
 
Thanks for all your suggestions. I'm assuming that by now have Apache 2.2 installed (the new ports default) it doesn't matter that Apache 1.3 is not installed.

Ports certainly isn't for the faint-hearted or the impatient or those without a bit of free time to spend. Actually I tried a full-ports desktop setup after trying PCBSD and before putting FreeBSD desktop on my laptop, I gave up before it finished, many dependency chain issues. But I am greedy with the options, this is partly to blame. So, when installing on my laptop I decided to use packages. I spend quite a bit of time learning have to configure it for desktop use. Then I had some problem with LibreOffice and some packages appear missing from 8.x-RELEASE repo. At least with ports, everything is there an up-to-date as possible. I decided to update all my packages using portupgrade -a, but I didn't know it would use the ports, I should have used -PP to force only packages! Lesson learned. Now being part package / part ports, not knowing which is which, I decided to go for all ports and just learn it.

I'm guessing / hoping that once all currently installed packages are replaced by ports, and it's all bedded in, it will get easier to update in future.

One more question, if KDE4 is at 4.6.2 in ports (looking at freshports website) will I get it using portupgrade / portmaster if I'm on 8.2-RELEASE, or do I have to be on 8-STABLE or CURRENT (9)? In other words are ports independent of release / base OS or capped according to release version?
 
With the proviso that the INDEX-* files determine on which FreeBSD major version ports can(not) be installed.
 
Thanks again, I will try portmaster and see if I have better results.

@DutchDaemon: Where are these "INDEX-* files" located? In the individual port directories? Should 8.2-STABLE be on 4.5.5 or 4.6.2?
 
Things are shaping up now!

WOW, what a difference portmaster makes! I was thinking why can't the ports ask me the options altogether before downloading / compiling. Because I get back to my PC and it's waiting for my input, sometimes for hours. Portmaster seems to do all the checking / questioning first them (hopefully) compile away until done.

Had a bit of trouble at first, until I followed the instructions for updating KDE4 from 4.5.5 to 4.6.x, portmaster can't do it by itself. Also a few deprecated ports giving me trouble. I just hope I haven't damaged the dependency chain along the way, i.e with using portupgrade / pkgdb and portmaster within same update cycle.

I previously did a pkgdb -L to see if I was OK, it completed without errors but said it fixed stuff without actually downloaded / compiling / installing anything. Is there a portmaster equivalent to check nothings broken?
 
ethoms said:
WOW, what a difference portmaster makes! I was thinking why can't the ports ask me the options altogether before downloading / compiling. Because I get back to my PC and it's waiting for my input, sometimes for hours. Portmaster seems to do all the checking / questioning first them (hopefully) compile away until done.

portupgrade does that with the -c or -C options.

I previously did a pkgdb -L to see if I was OK, it completed without errors but said it fixed stuff without actually downloaded / compiling / installing anything. Is there a portmaster equivalent to check nothings broken?

See post #3.
 
ethom, portupgrade(1) and portmaster(8) have fine manuals, and there are hundreds of topics with thousands of posts on them in this sub-forum. No need to repeat everything here. But: stick to one, use portupgrade or portmaster, not both.
 
Once again, thanks for all your help. You're right I should RTFM, but sometimes a bit of direct feedback saves a lot of time sifting through manuals. At least now I know where to start. �e
 
Back
Top