Forum Moderators: bakedjake

Message Too Old, No Replies

Upgrading ports in FreeBSD

not remove all, then add all

         

martin

3:55 pm on Jul 26, 2004 (gmt 0)

10+ Year Member



Hi,

anyone know a way in FreeBSD to upgrade ports. It doesn't look like the best thing to remove everything and then wait 20 hours for the stuff to compile. Often I see a case where portupgrade won't deinstall and reinstall a package too which I can do manually, I guess adding -f probably will help but was wondering if there is a better tool for the job.

MattyMoose

4:45 pm on Jul 26, 2004 (gmt 0)

10+ Year Member



Portupgrade can be a pain sometimes, especially when they make large changes (things like autoconf recently and gettext a few months back). When these big changes happen, everything gets kinda messed up.

What I do is run pkgdb -F, to fix the dependencies after a cvsup, then run portupgrade. Any packages that failed, I then keep a list of them.

Typically, it's just a matter of "make deinstall"ing the port, and then make install again. This usually fixes it. If you can track down the major offending port (ie, gettext or whatnot), and deinstall/install it, and try portupgrade again, I find it works after that.

For the most part, there is no other tool that will do it as well as portupgrade (that I've seen). but, have a look at freshports.org, and search for anything package/port related. There may be something there.

-MM

binidiot

7:21 pm on Jul 26, 2004 (gmt 0)

10+ Year Member



Hello,
tho have not tried -P and -PP args to portupgrade use pkg_add first and pkg_add only respectively. ...

drbrain

7:27 pm on Jul 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



yep, portupgrade is the tool for the job.

martin

10:43 pm on Jul 26, 2004 (gmt 0)

10+ Year Member



Yes, I am using portupgrade the only thing is that sometimes it won't upgrade a package because they have something like circular dependancies on old versions.

Right not I'm compiling packages on another box with -p and hope I can remove everything later and install them at once.

martin

11:08 am on Jul 27, 2004 (gmt 0)

10+ Year Member



I see stupid stuff with portupgrade like this even after I've cvsuped ports-all, and ran portsdb -u, and pkgdb -F doesn't ask me anything. Any ideas here, is the port broken or maybe my package db? I don't think this is normal because portupgrade works most of the time.

portinstall -rR xchat2
...
===> Installing for atk-1.4.1_2
===> atk-1.4.1_2 depends on executable: pkg-config - found
===> Generating temporary packing list
===> Checking if accessibility/atk already installed
===> atk-1.4.1_2 is already installed
You may wish to ``make deinstall'' and install this port again
by ``make reinstall'' to upgrade it properly.
If you really wish to overwrite the old port of accessibility/atk
without deleting it first, set the variable "FORCE_PKG_REGISTER"
in your environment or the "make install" command line.
*** Error code 1

Stop in /usr/ports/accessibility/atk.
*** Error code 1

Stop in /usr/ports/irc/xchat2.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portinstall54518.4 make
** Fix the problem and try again.
** Listing the failed packages (*:skipped /!:failed)
! irc/xchat2(unknown build error)
---> Packages processed: 5 done, 21 ignored, 0 skipped and 1 failed

martin

12:57 pm on Jul 27, 2004 (gmt 0)

10+ Year Member



Actually just noticed that something is wrong with the dependancies. The xchat port requires a version of atk that's not yet available in ports...

A better example of what I mean is for example trying to upgrade KDE from 3.1.4 to 3.2.3 it wants to install openldap22-client but openldap21-client is installed and it chokes. And the only way to do the upgrade is to remove all of KDE and openldap21-client and then do an install.

binidiot

7:18 pm on Jul 27, 2004 (gmt 0)

10+ Year Member



Sounds about right. I just switched from XFree86 to Xorg and upgraded to Samba3 and found that I had to delete programs that were pkg_add installed, then reinstall via ports so that I could get everything updated and all the dependencies working. Have not found a better way. Cheers.