Solved [Solved] pkgng/pkg upgrade

  • Thread starter Thread starter Anonymous
  • Start date Start date
A

Anonymous

Guest
It's horrible - freebsd FreeBSD is not updateable any more. I've tried to update with Portmaster. There sometimes are troubles with stale depencies. Before there was
Code:
pkgdb -F
and I can do it. Now there is such tool any more. So I can't update further. I tried to repair it with pkg update and this installs everything, it installed three days ago again. With all problems and needs a lot of time.

This makes no sense. Can anybody tell me, how to do this better?
 
Re: pkgng/pkg upgrade

pkgdb is from ports-mgmt/portupgrade. Please stop using it. Or alternatively, use it with portupgrade, but it's better to just use ports-mgmt/portmaster. Or maybe pkg upgrade.

As far as old dependencies go, that depends on what binary packages are available. If you want things to be current, use ports instead.
 
Re: pkgng/pkg upgrade

The try with pkg upgrade installs everything new, what it installs three days ago, the same packages?
 
Re: pkgng/pkg upgrade

Don't mix installs from the ports tree with installs via binary packages. Bad things will happen (as you've noticed), unless you really understand how the ports tree and packages work. Either install everything via the ports tree using a nice tool like ports-mgmt/portmaster, or use binary packages via pkg(1).

So, if you want to always use the ports tree, the following will (generally) always work:
Code:
# rm -rf /usr/ports/*       <-- to make sure we're starting fresh, only do this the first time
# portsnap fetch extract    <-- to make sure we're starting fresh, only do this the first time

Then, on a weekly, semi-weekly, monthly, whatever schedule:
Code:
# portsnap fetch update
# more /usr/ports/UPDATING  <-- read everything carefully to see if any of it applies to you
# portmaster -a             <-- upgrade everything, all in one batch

Simple as that. Don't change too many OPTIONS, and do research on the OPTIONS you do change to see how things change through the dependency change. Try to make global changes in /etc/make.conf instead of trying to remember the OPTIONS you've changed in each port.

Or, if you don't want to worry about compilation issues, or waiting for compiles to finish, or don't want to think too much about things, then just stick to binary packages, and ignore the ports tree completely. Then, updates become even simpler:
Code:
# pkg update
# pkg upgrade

That's it. Do that every 2-4 weeks to stay up-to-date. Done. No muss, no fuss.

Just don't mix and match the two systems unless you really understand how the ports tree works. Or, look into ports-mgmt/poudriere for a proper method to mix the two (custom compile your own binary packages).
 
Re: pkgng/pkg upgrade

After rm -rf and portsnap fetch extract.

If portmaster fails, I do it normally direct in the ports. After this there were sometimes problems to replace the old package with the new. I do it with pkgdb -F. Now this command doesn't work. I have two packages I've compiled successful. But it appears in the update script again.

pkg check has senseless output and no replacement for pkgdb -F.

What should I do, to make the system recognize the installation. Or how can I switch back to the old system ?

(There's a way with pkg convertbut it is not really clear to me.)
 
Re: pkgng/pkg upgrade

The link includes no solution.

If I work with portmaster it fails. I have to compile with the ports. It's compiled fine. I think it's a problem with the registration. Before pkgng I check this with pkgdb -F. Now there is no tool to do this.

Every update check I see the same packages, as I recently compile. I can't it better explain, my mother language is German.
 
Re: pkgng/pkg upgrade

I need something that does the same as pkgdb -F.
 
Re: pkgng/pkg upgrade

It's been said before and I'm going to say it again. Stop using portupgrade! Tell us exactly what's failing and how.
 
Re: pkgng/pkg upgrade

Dear @talsamon,

I like to give you some advice that has been helpful for me to prevent the kind of trouble you might have now. It might make sense for you to save all configuration files and so on which are required to run email, Usenet or whatever. If you can clear up some space on your hard disk for a second instance of FreeBSD you should do that. If this is possible you end up with one stable installation as a starting point. The second setup might be new or your current installation including the configuration for your services. In best case it is a second working system as well. Then you have some kind of victim for destroy and backup tests which is essential but hopefully never required. Then you can be pretty relaxed if something goes wrong. You have a back-up and you have practice how to restore it. And if it fails for any reason there is additional working installation which might be somehow slightly outdated but suitable for the daily work until the primary system is up and running again.

You have not yet mentioned up to now what is valuable on your current installation. If you are just unhappy I suggest to calm down and restart again and trust the gurus in the forum. I am not a guru but may be my idea is not the worst way of working. Of course in best case you still have an installation of your operating system which you are used to as a just in case for the daily work.

Viel Erfolg!
 
Last edited by a moderator:
Re: pkgng/pkg upgrade

First thanks for all answers.

Thank you for calming words you write. Surely I've backed up all configurations, emails and so on. To find other ways to solve the recent problems would a little bit hard for me to explain, how I am to do it. But it took me hours. I wanted to "test" PKGNG. I have tried once, a year ago, it was also a chaos. Sorry, for my anger, but I was disappointed about PKGNG and was not really concentrated enough to work clearly.
 
Back
Top