Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jun 2004 16:51:59 -0400
From:      "Ralph M. Los" <Ralph@boundariez.com>
To:        "Randy Pratt" <rpratt1950@earthlink.net>, "Kent Stewart" <kstewart@owt.com>
Cc:        bhunter@solisix.com
Subject:   RE: portupgrade -c (was Re: Boot GUI / Boot data and process / Fragmentation)
Message-ID:  <B06CC0370BBC0F4EA588FD6952A939251A2F3C@tenacious.boundariez.com>

next in thread | raw e-mail | index | archive | help
Alright, I feel stupid but I'm going to ask anyway...

Portversion exists in /usr/local/sbin on one FreeBSD 5.2.1 server, but
not on the other, which is an install off the *same CD*. What package or
port does portversion come from?

Thanks....

::-----Original Message-----
::From: Randy Pratt [mailto:rpratt1950@earthlink.net]=20
::Sent: Tuesday, June 08, 2004 12:16 PM
::To: Kent Stewart
::Cc: freebsd-questions@freebsd.org; bhunter@solisix.com
::Subject: portupgrade -c (was Re: Boot GUI / Boot data and=20
::process / Fragmentation)
::
::
::On Tue, 8 Jun 2004 00:59:58 -0700
::Kent Stewart <kstewart@owt.com> wrote:
::
::> On Tuesday 08 June 2004 12:37 am, Bruce Hunter wrote:
::> > Thanks for your help Kent
::> >
::> > I read something about using portversion -c with the portupgrade=20
::> > command to upgrade installed pkgs that needed to be updated.
::> >
::> > When I run portversion -c  :: I get a print out of things=20
::needed to=20
::> > be upgraded and at the end, it shows a 'if' statment.
::> >
::> > How do you use this command with portupgrade so it just=20
::updates them=20
::> > instead of just showing me. Just do it dang it... just do it! ;o)
::
::The output of "portversion -c" needs to be redirected to a file:
::
::    portversion -c > scriptname.sh
::
::To make it usable as a shell script, it needs to have
::
::    #!/bin/sh
::
::added at the top to insure that it uses the sh command=20
::interperter. Then, the script needs to be made executable:
::
::    chmod 744 scriptname.sh
::
::Then it can be run as root:
::
::    ./scriptname.sh
::
::> I'm not the one to ask because I use the -c and do them one=20
::at a time.
::> The portupgrade option -rRa will do some of it. I just want=20
::it to do it=20
::> at my convience and choosing :). I also have an AMD 2400+=20
::that sits off=20
::> to the side of my computer desk and I build everything on it. The=20
::> problem with the -c list is that it doesn't build=20
::dependancies first.
::
::I think it will build the required dependencies first *if*=20
::they need updated.  The synopsis of portupgrade is:
::
::    portupgrade [ ... bunch of options ... ] pkgname-glob
::
::A list of ports can be passed to portugrade and it will check=20
::which needs to be built first.  This can easily be checked if=20
::you have doubts.  Use -n for "no-execute" and -f to "force". =20
::This is a test case I tried where liveMedia is a dependency=20
::of mplayer:
::
::  # portupgrade -nf mplayer-gtk-esound-0.92.1_2 liveMedia-2004.06.07,1
::  --->  Session started at: Tue, 08 Jun 2004 11:06:39 -0400
::  --->  Reinstallation of net/liveMedia started at: Tue, 08 Jun 2004
::        11:06:40 -0400
::  --->  Reinstalling 'liveMedia-2004.06.07,1' (net/liveMedia)
::        OK? [no]
::  --->  Reinstallation of net/liveMedia ended at: Tue, 08 Jun 2004
::        11:06:40 -0400 (consumed 00:00:00)
::  --->  Reinstallation of multimedia/mplayer started at: Tue, 08 Jun
::        2004 11:06:41 -0400
::  --->  Reinstalling 'mplayer-gtk-esound-0.92.1_2'
::        (multimedia/mplayer)
::        OK? [no]
::  --->  Reinstallation of multimedia/mplayer ended at: Tue, 08 Jun
::        2004 11:06:41 -0400 (consumed 00:00:00)
::  --->  Listing the results (+:done / -:ignored / *:skipped /=20
::!:failed)
::        + net/liveMedia (liveMedia-2004.06.07,1)
::        + multimedia/mplayer (mplayer-gtk-esound-0.92.1_2)
::  --->  Packages processed: 2 done, 0 ignored, 0 skipped and 0 failed
::  --->  Session ended at: Tue, 08 Jun 2004 11:06:41 -0400=20
::(consumed 00:00:01)
::  #
::
::Notice that liveMedia was updated first even though it was=20
::last in the list of ports passed to portupgrade.  The portversion -c=20
::produces a list of ports and stores them in its variable=20
::$pkgs. Portupgrade will take the list and build them in the=20
::correct dependency order.
::
::I've used this approach for several years now and it works fine.
::
::However, caution should be used when scripting the upgrading=20
::of ports.  After cvsupping and running portsdb -Uu, the=20
::/usr/ports/UPDATING should be read and any items that are=20
::applicable to the installation should be followed before=20
::running any scripts or other portupgrade commands.
::
::If you still prefer doing ports manually, the output of=20
::portupgrade -c can still be useful.  By modifying the script=20
::slightly, it will produce a list of ports to be updated in=20
::the order they should be updated.  Just change the line:
::
::    portupgrade "$@" $pkgs
::
::to:
::
::    pkg_glob $pkgs | pkg_sort
::
::It should be noted that some ports may not work until the=20
::entire list is updated and as usual, your mileage may vary.
::
::I'm sure someone will correct me if I'm thinking wrong about this.
::
::Best regards,
::
::Randy
::
::[ ... other topics snipped ... ]
::
::_______________________________________________
::freebsd-questions@freebsd.org mailing list=20
::http://lists.freebsd.org/mailman/listinfo/free::bsd-questions
::
::To unsubscribe, send any mail to=20
::"freebsd-questions-unsubscribe@freebsd.org"
::



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B06CC0370BBC0F4EA588FD6952A939251A2F3C>