186ba [Solved] pkg2ng help please - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Ports & Packages > Installation and Maintenance of FreeBSD Ports or Packages

Installation and Maintenance of FreeBSD Ports or Packages Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software).

Reply
 
Thread Tools Display Modes
  #1  
Old October 16th, 2012, 23:09
kapetros kapetros is offline
Junior Member
 
Join Date: Aug 2011
Location: Alexandroupolis, Greece
Posts: 6
Thanks: 4
Thanked 0 Times in 0 Posts
Default 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.
Reply With Quote
  #2  
Old October 16th, 2012, 23:38
cpu82's Avatar
cpu82 cpu82 is online now
Member
 
Join Date: Jul 2011
Location: Granada, ES
Posts: 862
Thanks: 173
Thanked 299 Times in 231 Posts
Default

Please read carefully:
Quote:
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

Last edited by cpu82; March 30th, 2013 at 02:12. Reason: Correct syntax
Reply With Quote
  #3  
Old October 17th, 2012, 00:35
wmoreno3 wmoreno3 is offline
Junior Member
 
Join Date: Oct 2011
Posts: 30
Thanks: 1
Thanked 1 Time in 1 Post
Default 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
Reply With Quote
  #4  
Old October 17th, 2012, 00:40
kpa kpa is offline
Giant Locked
 
Join Date: Jul 2010
Location: People's Technocratic Republic of Finland
Posts: 2,007
Thanks: 44
Thanked 466 Times in 396 Posts
Default

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.
Reply With Quote
  #5  
Old October 17th, 2012, 07:55
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,702
Thanks: 47
Thanked 2,022 Times in 1,861 Posts
Default

Quote:
Originally Posted by kapetros View Post
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.
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #6  
Old October 17th, 2012, 10:49
kapetros kapetros is offline
Junior Member
 
Join Date: Aug 2011
Location: Alexandroupolis, Greece
Posts: 6
Thanks: 4
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #7  
Old October 21st, 2012, 05:08
wmoreno3 wmoreno3 is offline
Junior Member
 
Join Date: Oct 2011
Posts: 30
Thanks: 1
Thanked 1 Time in 1 Post
Default

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#
Reply With Quote
  #8  
Old October 21st, 2012, 16:17
wblock@'s Avatar
wblock@ wblock@ is offline
Moderator
 
Join Date: Sep 2009
Location: Milky Way galaxy
Posts: 7,706
Thanks: 430
Thanked 1,757 Times in 1,456 Posts
Default

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.
Reply With Quote
The Following User Says Thank You to wblock@ For This Useful Post:
wmoreno3 (October 21st, 2012)
  #9  
Old October 26th, 2012, 14:12
mariourk mariourk is offline
Member
 
Join Date: Nov 2011
Posts: 120
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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?
Reply With Quote
  #10  
Old October 26th, 2012, 14:17
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,702
Thanks: 47
Thanked 2,022 Times in 1,861 Posts
Default

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.
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #11  
Old October 26th, 2012, 14:22
mariourk mariourk is offline
Member
 
Join Date: Nov 2011
Posts: 120
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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?
Reply With Quote
  #12  
Old October 26th, 2012, 14:30
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,702
Thanks: 47
Thanked 2,022 Times in 1,861 Posts
Default

Quote:
Originally Posted by mariourk View Post
So, commands like
Code:
pkg_version -v | grep '<'
suddenly don't work anymore?
Correct.

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

Quote:
Probably kicking in an open door, but is there some documentation that sheds some light on this?
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
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #13  
Old October 26th, 2012, 14:36
mariourk mariourk is offline
Member
 
Join Date: Nov 2011
Posts: 120
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Aha, now I know what I did wrong.

Thanks for enlightening me
Reply With Quote
  #14  
Old October 26th, 2012, 21:17
phoenix's Avatar
phoenix phoenix is offline
Moderator
 
Join Date: Nov 2008
Location: Kamloops, BC, Canada
Posts: 3,141
Thanks: 43
Thanked 702 Times in 579 Posts
Default

Quote:
Originally Posted by SirDice View Post
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.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #15  
Old October 27th, 2012, 00:21
jb_fvwm2 jb_fvwm2 is offline
Senior Member
 
Join Date: Nov 2008
Posts: 1,386
Thanks: 60
Thanked 145 Times in 130 Posts
Default

Quote:
Originally Posted by SirDice View Post
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.
__________________
Using /lookat/ with zsh/grep/find/aliases/pipes/portmaster and /var/db/pkg/ flat files to meteorically speed port installs/upgrades forever hopefully...
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solved] ccache after pkg2ng Martillo1 Installation and Maintenance of FreeBSD Ports or Packages 4 September 1st, 2012 14:51


All times are GMT +1. The time now is 21:58.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0