pkg2ng help please

Hello, I'm on FreeBSD 9.0 Stable, and after todays ports update, I show the new pkg2ng thing.
Is this only for Current? because it broke my pkgdb, after executing the portmaster instructions in ports Updating file.
 
Please read carefully:
20121010:
AFFECTS: users of CURRENT (OSVERSION >= 1000017)
AUTHOR: bapt@FreeBSD.org

The ports tree is now using pkgng as the default package manager
for HEAD. This only affects users of CURRENT -- users of other
branches need not take any action
.

To keep pkg_install as the default package manager, use the new
WITHOUT_PKGNG knob in make.conf

To make the switch:

1/ Set WITHOUT_PKGNG=yes in make.conf and upgrade all your ports to
the latest available versions using your favourite tools.

2/ Install ports-mgmt/pkg

3/ Remove WITHOUT_PKGNG from make.conf and run:

# pkg2ng
 
That is seems, to be use with stable version ?

Code:
20121015:
  AFFECTS: users of ports-mgmt/portmaster
  AUTHOR: bdrewery@FreeBSD.org

  Portmaster now supports pkgng. To use pkgng, enable the patch in the port,
  enable pkgng in your make.conf, and convert your existing /var/db/pkg
  database. Also see UPDATING entry 20121010 if you are on a recent CURRENT
  and do not want to use pkg.

  # make -C /usr/ports/ports-mgmt/portmaster config build deinstall install clean
  # echo 'WITH_PKGNG=yes' >> /etc/make.conf
  # pkg2ng

20121015:
  AFFECTS: users of ports-mgmt/portupgrade
  AUTHOR: bdrewery@FreeBSD.org

  Portupgrade now supports pkgng. To use pkgng, enable it in your make.conf,
  and convert your databases.

  # echo 'WITH_PKGNG=yes' >> /etc/make.conf
  # pkg2ng
  # pkgdb -fu
 
To make the point more clear, the mentioned tools do support PKGNG but nothing forces you to use PKGNG at this point. It's only if you're on 10-CURRENT PKGNG is turned on by default.
 
kapetros said:
Hello, I'm on FreeBSD 9.0 Stable, and after todays ports update, I show the new pkg2ng thing.
Is this only for Current? because it broke my pkgdb, after executing the portmaster instructions in ports Updating file.

It's not only for -CURRENT. It works just fine on my 9-STABLE. But you have to realise both portmaster(8) and portupgrade(1) use the 'old' style pkg_tools. It stores it's data differently and thus these tools can't handle it. Hence the recent patches to both of them.
 
Well thanks for the answers, the thing is that when I run the pkg2ng, perl-5.16.0 didn't installed because it was installing files in the same place with p5-IO-Compress-2.055, so the conversion ended up in failure.

While executing the steps below to recover my system, pkgdb complained that there wasn't any packages in the database.
Code:
# rm -/var/db/pkg/pkgdb.db
# pkgdb -Ffuv
For now luckily I had a backup of my system, so I restore it to the original state.
 
I was using portmanager before, I think that I must be reinstall all system in order to rebuilds the system with portmaster, portupgrade or pkgng.

Code:
server# make install clean
/usr/ports/ports-mgmt/pkg/work/pkg-1.0.1/pkg-static/pkg-static: not found
*** Error code 127

Stop in /usr/ports/ports-mgmt/pkg.
server#
 
No, but you should reinstall the port upgrade programs after rebuilding them with the patches so they will see the new package information. It's not just a rebuild, use make config in the port directory to turn on the pkgng patches.
 
I had the same problem. I followed the instructions to use pkgng and suddenly my pkgdb was gone, the system kept telling me no packages were installed. Luckily I was able to undo all this, by restoring /var/db/pkg.bak, comment WITH_PKGNG=yes in /etc/make.conf and recompile ports-mgmt/portmaster and ports-mgmt/portupgrade without PKGNG support.

However, I do like to know what went wrong. Can someone explain this to me?
 
Nothing went wrong, it did exactly what it's supposed to do. PKGNG is a replacement for the pkg_tools. If you start using it the old tools won't work anymore. This is by design.
 
So, commands like
Code:
pkg_version -v | grep '<'
suddenly don't work anymore? What am I supposed to use instead? Probably kicking in an open door, but is there some documentation that sheds some light on this? :q
 
mariourk said:
So, commands like
Code:
pkg_version -v | grep '<'
suddenly don't work anymore?
Correct.

What am I supposed to use instead?
A similar command:
# pkg version -v | grep '<'

Probably kicking in an open door, but is there some documentation that sheds some light on this? :q

pkg(8) (For some reason the FreeBSD manual browser doesn't seem to have it, it should be on your system though)

http://wiki.freebsd.org/pkgng
 
SirDice said:
Nothing went wrong, it did exactly what it's supposed to do. PKGNG is a replacement for the pkg_tools. If you start using it the old tools won't work anymore. This is by design.

And, for every pkg_* command, there is an equivalent "pkg *" command. It's not quite exactly 1:1, but it's very close.

For example:
  • pkg_add --> pkg add
  • pkg_version --> pkg version
  • pkg_info --> pkg info
  • pkg_delete --> pkg delete or pkg remove
  • pkg_audit --> pkg audit
And so on.

Once you install pkg(8) and convert the package database using pkg2ng(8), don't ever touch the pkg_* tools again. Only use the pkg equivalents.
 
SirDice said:
Nothing went wrong, it did exactly what it's supposed to do. PKGNG is a replacement for the pkg_tools. If you start using it the old tools won't work anymore. This is by design.
I'm wondering if anyone could code up a /ports-mgmt/legacy-pkg which would formulate a /var/db/pkg "v9" database on top of the pkg database after pkg is installed. (And maybe legacy command front-ends for the newer ones...)
Sounds difficult, but I see no other reasons why not.
 
I am using the old system until pkg2ng is the default, in order to do not have any problem.

Code:
FreeBSD mydomain 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013     root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
 
Back
Top