upgrading a single package

hi, ima newbie so pls excuse me if this is not the right section or if it has alrady been discussed.. Ive searched around but didnt have any luck..

I just upgraded my port tree with portsnap.. now, I wanted to upgrade my wine package.. problem is, it depends on other packages as well.. and the new one wants new versions of already installed packages.

in these situations, what is the right procedure?

should I tell (and how?) pkg_add to replace everything? (I mean, wine and every dependencies and every subdependencies and so on..) or shall I install new versions along the old one and keep different versions of the same package?

and if I replace the old ones with the new versions, will it be safe? I mean, will libxyz-1.6_2 will be backward compatible with libxyz-1.6_1 or libxyz-1.5_7?

thnx
 
Upgrade your ports (after reading /usr/ports/UPDATING).
IMO, an easy way to avoid situations like this is keeping the installed packages updated by updating frequently.
 
Four options:

1. use packages exclusively and accept that they will never be up-to-date and that dependencies that are not updated yet will affect other packages relying on those dependencies; you can use portupgrade -PP for that, but your ports tree must be up to date

2. use ports exclusively, knowing that they will always be up to date, at the cost of some compile time

3. use a tool like portupgrade -P to use packages if they're available, or ports if they're not; your ports tree must be up to date; you'll always be up to date, but chances are that you'll be running ports exclusively within a few months (so option 3 will lead to option 2 in the long run).

4. install sysutils/bsdadminscripts which contains a package management/upgrade tool without the ports tree being needed.

( and 5. make sure you distinguish between ports and packages )
 
bany said:
and if I replace the old ones with the new versions, will it be safe? I mean, will libxyz-1.6_2 will be backward compatible with libxyz-1.6_1 or libxyz-1.5_7?

As ale mentioned, check /usr/ports/UPDATING before you upgrade. All major changes are listed so users will know when something might break or how a certain port should be upgraded.

An example:
20090719:
AFFECTS: users of graphics/jpeg
AUTHOR: dinoex@FreeBSD.org

The IJG jpeg library has been updated to version 7.0. Please rebuild all
ports that depend on it.

If you use portmaster:

portmaster -r jpeg-

Or, if you would prefer a more gradual approach:

portmaster -w jpeg- (Check the man page for more information)

If you use portupgrade:

portupgrade -fr graphics/jpeg

Usually upgrading doesn't break anything.
 
thank you.. Ive read UPGRADING and discovered a new world of /usr/ports/ports-mgmt ;-)

I decided to rely on ports and keep them up to date with portsnap..

since I know nothing about portmaster or portupdate, I decided to go with portmaster.. but if you think there are reasons why I should use something else please tell me..

now, just to learn, I updated firefox from 3.0.10 to 3.0.14.. with portmaster everything worked great.. every dependecies were updated and rebuilt, sources fetched in background.. cool.. great.. really..

then I decided to do the opposite, that is, rebuild every ports that relies on a given one.. I decided to rebuild everything depending on jpeg-7 (as adviced in UPGRADING).. I did a portmaster -r jpeg-7, but I have the following error..

one of the ports that needs rebuild is ghostscript8-8.64_1 (and upgraded to 8-8.64_6) but it relies on cups-image, that relies on cups-client.. now, cups-client has already been upgraded (by the previous firefox upgrade), so that after building portmaster complains that cups-client-1.3.10_4 already exists and exits with *** Error1

should I pkg_delete -f cups-client-1.3.10_4?
is there a way to tell portmaster to skip already installed up to date ports? or to reinstall them?

am I missing something?

Ive looked through the man pages and tried different options but I didnt find anything..
 
No, it's either -Rr or -Rf.

Code:
     [-R] [B]-r[/B] name/glob of port in /var/db/pkg
         rebuild the specified port, and all ports that depend on it

     -R  used with the -r or -f options to skip ports updated on a previous
         run.

     [-R] [B]-f[/B]
         always rebuild ports (overrides -i)

-r is downward recursive (port, and ports depending on it)
-f is upward recursive (port, and ports it depends on)
 
In the pkg-plist of each port are binaries and/or .so(number) files.
if you "ldd" those, "not founds" might mean they actually need
updating. I suppose if you try the jpeg upgrade, unless you do
the "ldd" method, ports may not get upgraded that may need it
(and wholesale upgrading everything, a few might *not* actually
need it).
..........
The above doesn't answer adequately, any question but is worth maybe
knowing after you do the upgrade in general, and maybe for next time.
.........
 
I switched to portupgrade.. the man page is IMHO more explicit, I know (kind of) what im doing and it does what i need..

just to be sure I got the point..

Ive portupgrade -frP jpeg-7

it took 7 hours and rebuilt a lot of ports.. up to the top level meta-port xfce4 (at least upgraded to 4.6.1)..

since a lot of these dont require jpeg-7, I think they've been rebuilt/updated because they relied on something that relied on something (and so on..) ..that relied on jpeg-7, so that it had to rebuild everything bottom-up.. is that right?
 
PS: after the build was complete I had 9 warnings.. a few were "skipped".. a few were "(deinstall error)", 1 was "configure error" and 1 was "compile error".. should I worry?
 
This does happen occasionally. It's best to find out what caused the problem since you'll have to rebuild those ports sooner or later.
 
bany said:
PS: after the build was complete I had 9 warnings.. a few were "skipped".. a few were "(deinstall error)", 1 was "configure error" and 1 was "compile error".. should I worry?
Check with $ pkg_version -l "<" which ports still need to be upgraded.
Try upgrading them one at the time, starting with the ones with less dependencies (look for example at the output of $ pkg_info -Rx firefox).
Try to understand the error and solve it by yourself. I you get no clue post the error message.
 
ale said:
Check with $ pkg_version -l "<" which ports still need to be upgraded.
Try upgrading them one at the time, starting with the ones with less dependencies (look for example at the output of $ pkg_info -Rx firefox).
Try to understand the error and solve it by yourself. I you get no clue post the error message.

Thank you!
 
Back
Top