stay up to date with ports and packages, problem

Matthew Seaman matthew at FreeBSD.org
Sat May 19 13:58:38 UTC 2012


On 19/05/2012 15:27, Beastie-Boy wrote:
> i ran into problems keeping my ports-collection up to date.
> Although i did a portsnap fet and install i think there are obsolete an old
> ports still on the disk.

portsnap will synchronise your ports tree with what is in the FreeBSD
CVS repo.  The way it works, you shouldn't get any old ports left
cluttering up /usr/ports unless things have gone very wrong.  In which
case portsnap would be emitting all sorts of error messages and the fact
that there was a problem would be obvious.

> I tried to compile a programm and it complained about an older version of a
> depending package.

OK.  This is a conceptual thing.  The ports tree (ie. /usr/ports) is a
set of *instructions* for how to build and install ports.  portsnap will
update all those instructions in the ports tree, but to update the
actual ports you have installed requires use of a different software
package.

> I deleted the whole ports-dir, did the fetch and extract again, problem
> persists still.

Yep.  I hope you can see from what I wrote above how doing that wouldn't
solve the problem you are seeing.

> Yes, i searched all the forums and read a lot about managing ports and
> packages.
> Right now i am stuck.
> So, how do i delete really *all* ports and *all* packages at once?

That's a bit drastic and pretty much something you'ld never actually
want to do in normal usage.  However, for completeness' sake:

   # pkg_delete -af

will remove all installed ports.  After doing that there should be
hardly anything left under /usr/local -- most of what's left would be
config files in /usr/local/etc.

But don't do that.  It is a big waste of time and completely unnecessary.

> Is it possible with doing a fectch and extract having the latest ports?
> I was recommended to use only portmaster and not to use sysinstall after a
> finished installation.
> Well, i dont know.

The advice to use portmaster is good.

A typical session to maintain all your ports goes something like this:

   # portsnap fetch update             (Gets the latest contents for
                                        /usr/ports)
   # less /usr/ports/UPDATING          (Check for any special
                                        instructions affecting any
                                        ports you have installed.
                                        Assuming nothing out of the
                                        ordinary is required (and it
                                        usually isn't), then...)
   # pkg_version -vIL=                 (see what needs updating)
   # portmaster -a                     (update everything out of date)

and that's it.  It's not particularly hard to do, although it can be
time consuming, and very occasionally something will glitch out.  If you
wait a day or so and then try again the glitch will probably have been
fixed.  You'll find updates are more likely to run smoothly if you do
them like this regularly -- monthly should be adequate -- plus immediate
updates of anything portaudit reports has security problems.)

Your original problem -- a port not installing because of an out of date
dependency -- can be easily cured by:

   # portmaster category/example

where category/example is the port's directory path under /usr/ports.
This will update all dependencies as required before installing
category/example.

If you are still experiencing problems, please save a transcript of your
updating session and put it on a pastebin site, and then ask again here
with a link to the transcript.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20120519/70de2d59/signature.pgp


More information about the freebsd-questions mailing list