stay up to date with ports and packages, problem

2012-05-19 Thread Beastie-Boy
Hi folks,

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.
I tried to compile a programm and it complained about an older version of a
depending package.
I deleted the whole ports-dir, did the fetch and extract again, problem
persists still.
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?
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.

--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/stay-up-to-date-with-ports-and-packages-problem-tp570.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: stay up to date with ports and packages, problem

2012-05-19 Thread Matthew Seaman
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




signature.asc
Description: OpenPGP digital signature


Re: stay up to date with ports and packages, problem

2012-05-19 Thread Warren Block

On Sat, 19 May 2012, Matthew Seaman wrote:


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.


The -f is probably not needed.  I've done this rarely enough to not 
recall, but -a should sort everything in the right order so dependencies 
are uninstalled in order.



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)


portmaster can show ports that can be updated:

  portmaster -L --index-only

Or, more concisely:

  portmaster -L --index-only | egrep '(ew|ort) version|total install'

There's a short overview of port upgrading procedures and reasoning 
at http://www.wonkity.com/~wblock/docs/html/portupgrade.html .

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: stay up to date with ports and packages, problem

2012-05-19 Thread Matthew Seaman
On 19/05/2012 16:07, Warren Block wrote:
 The -f is probably not needed.  I've done this rarely enough to not
 recall, but -a should sort everything in the right order so dependencies
 are uninstalled in order.

I find that 'pkg_delete -af' gives more reliable results.  Agreed, it
should not be necessary but sometimes the dependency relationships
between ports aren't generated quite right, and '-f' just lets
pkg_delete do its thing without worrying about that -- not that
dependency ordering matters at all when you're deleting everything in
any case.

Cheers,

Matthew

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




signature.asc
Description: OpenPGP digital signature


Re: stay up to date with ports and packages, problem

2012-05-19 Thread Beastie-Boy
Ok, many thanks for your replies.
I forgot to tell that i recently upgraded from 8.1 to 9.0-RELEASE.
That excplains maybe why i had obsolete/old packages/ports on my disk.
The problem i had was that gdm, gnome didnt start after the upgrade.
So i tried to build the gnome and gdm thing again via pkg_add(didnt work)
and make install clean in ports(either).
Right now i deleted all ports in /usr, deleted packages in /var and
portsnaped me the all stuff again.
After that i pkg_add -r gnome2 again and now it looks better.
Before i had problems that package-1.2.3 is needed to build an only
package-1.2.2 is installed.
Sorry i cant paste logs, bsd is running on another machine.

so long

--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/stay-up-to-date-with-ports-and-packages-problem-tp570p5710066.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: stay up to date with ports and packages, problem

2012-05-19 Thread RW
On Sat, 19 May 2012 11:08:19 -0700 (PDT)
Beastie-Boy wrote:

 Ok, many thanks for your replies.
 I forgot to tell that i recently upgraded from 8.1 to 9.0-RELEASE.
 That excplains maybe why i had obsolete/old packages/ports on my disk.


When you cross a major OS release boundary, you need to force a rebuild
of all installed package, or reinstall from package files.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: stay up to date with ports and packages, problem

2012-05-19 Thread Polytropon
On Sat, 19 May 2012 19:43:09 +0100, RW wrote:
 On Sat, 19 May 2012 11:08:19 -0700 (PDT)
 Beastie-Boy wrote:
 
  Ok, many thanks for your replies.
  I forgot to tell that i recently upgraded from 8.1 to 9.0-RELEASE.
  That excplains maybe why i had obsolete/old packages/ports on my disk.
 
 
 When you cross a major OS release boundary, you need to force a rebuild
 of all installed package, or reinstall from package files.

It's often easy to do this using a port management tool.
See man portmaster containing an example of exactly
this procedure (EXAMPLES section).


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: stay up to date with ports and packages, problem

2012-05-19 Thread Matthew Seaman
On 19/05/2012 20:08, Beastie-Boy wrote:
 I forgot to tell that i recently upgraded from 8.1 to 9.0-RELEASE.
 That excplains maybe why i had obsolete/old packages/ports on my disk.

Ahah! That is exactly the situation where you do want to remove all your
installed ports and rebuild them.

Cheers,

Matthew

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




signature.asc
Description: OpenPGP digital signature


Re: stay up to date with ports and packages, problem

2012-05-19 Thread Polytropon
On Sat, 19 May 2012 11:08:19 -0700 (PDT), Beastie-Boy wrote:
 Ok, many thanks for your replies.
 I forgot to tell that i recently upgraded from 8.1 to 9.0-RELEASE.
 That excplains maybe why i had obsolete/old packages/ports on my disk.

When you do such an update (major version number), you should
always reinstall (update) your applications. You can avoid it
by installing the compat-Nx-i386 or compat-Nx-amd64 ports (where
N is the previously used major version number).

You've found many advices on how to do that already from the
list.



 The problem i had was that gdm, gnome didnt start after the upgrade.

That was to be expected.



 So i tried to build the gnome and gdm thing again via pkg_add(didnt work)
 and make install clean in ports(either).

You should make sure _all_ dependencies get recompiled. Using
a port management tool for this task often is more comfortable
than dealing with the bare ports (but it basically is not
wrong).



 Right now i deleted all ports in /usr, deleted packages in /var and
 portsnaped me the all stuff again.

Depending on how you deleted, it _might_ be required to reconstruct
the directory subtree /usr/local from the respective mtree file
in /etc/mtree. If you _really_ intend to delete everything, make
sure you have backups of config files, data files or your own
modifications to something located in the local/ subtree (for
example /usr/local/etc).



 After that i pkg_add -r gnome2 again and now it looks better.

Erm... when you're installing binary packages, you don't have to
deal with ports at all.



 Before i had problems that package-1.2.3 is needed to build an only
 package-1.2.2 is installed.

Correct, this happens when packages have lower version numbers
(not totally up to date) than the respective port would have.
That's why it's often a good idea to use _either_ ports _or_
packages (even though technically there is no problem mixing
them).

Again, allow me to mention port management tools. Using for
example portmaster, many tasks are easier to perform than
dealing with bare ports. Even the use of precompiled
packages (if desired) is possible. See man portmaster
and its EXAMPLES section for inspiration.



 Sorry i cant paste logs, bsd is running on another machine.

You can use SSH to log into the BSD machine and cut text from
the session. :-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: stay up to date with ports and packages, problem

2012-05-19 Thread Matthew Seaman
On 19/05/2012 21:09, Polytropon wrote:
 Sorry i cant paste logs, bsd is running on another machine.

 You can use SSH to log into the BSD machine and cut text from
 the session. :-)

Or just run:

   % script /tmp/session.log

Do all your updating tasks, then type 'exit' when done, and you'll get a
transcript of everything displayed on your terminal in session.log

Cheers,

Matthew

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




signature.asc
Description: OpenPGP digital signature


Re: stay up to date with ports and packages, problem

2012-05-19 Thread doug

On Sat, 19 May 2012, Polytropon wrote:


On Sat, 19 May 2012 11:08:19 -0700 (PDT), Beastie-Boy wrote:

Ok, many thanks for your replies.
I forgot to tell that i recently upgraded from 8.1 to 9.0-RELEASE.
That excplains maybe why i had obsolete/old packages/ports on my disk.


When you do such an update (major version number), you should
always reinstall (update) your applications. You can avoid it
by installing the compat-Nx-i386 or compat-Nx-amd64 ports (where
N is the previously used major version number).

You've found many advices on how to do that already from the
list.

The problem i had was that gdm, gnome didnt start after the upgrade.


That was to be expected.


So i tried to build the gnome and gdm thing again via pkg_add(didnt work)
and make install clean in ports(either).


You should make sure _all_ dependencies get recompiled. Using
a port management tool for this task often is more comfortable
than dealing with the bare ports (but it basically is not
wrong).


There are two great tools for dealing with problems stemming from the update of 
a single port going bad: pkg_cleanup and pkg_tree. I prefer portmaster over 
portupdate because portmaster only uses the data that is there from building or 
adding port/packages. portmaster probably works better for me because I only 
update in response to a need or problem.


I do not have enough time or computing power to build what is required for a 
workstation. I am using FreeBSD 9.0 and xfce 4.8. To get the functionality I had 
with KDE3.5 I ended up with 489 packages. I had hoped for a smaller number but 
that seems to be the norm for KDE or Gome. The only ports I built were a couple 
that insisted on installing an older version of perl and/or python. Everything 
else was via package add. In my experience this model only works near the front 
of a major release. As the lower level ports diverge updates must be built. Here 
pkg_cleanup is a great tool for taking a step back. Perhaps building regularly 
on a weekly basis and updating everying would work. For me after I get a 
functional system I only add new stuff. I do not remember having to reinstalling 
something because it did not work.


Before someone pointed out pkg_cleanup I pretty completely broke my desktop 
(this in the 7.x days) just by upgrading firefox and then chasing the issues 
that came up.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org