[FreeBSD] Setting up pkgng - BSD

Users browsing this thread: 1 Guest(s)
Amzo
Members
Pkg 1.0 is out now! The betas and RCs are over, say hello to the first release!


You may, or may not have heard of the introduction of FreeBSD's new package manager, which is a huge improvement of the old pkg-* tools.

What is pkgng?

Quote:pkgng is:

a replacement for pkg_* tools
a tool to query/manage installed packages
a tool to deal with binary packages
a tool to upgrade/install packages from a remote repository
a library that provides all the package management in a safe way so one can write a new frontend

INSTALLING:

To install pkgng, you can install directly from the ports tree:

Code:
cd /usr/ports/ports-mgmt/pkg; make install clean

Once installed, you'll need to setup the config.

Code:
mv /usr/local/etc/pkg.conf.sample /usr/local/etc/pkg.conf

the config won't need any editing, it already has a repo setup for it now.

REPO UPDATE:

To update the repo.

PHP Code:
pkg update 

If you've been installing from ports or using the old pkg-* tools. You should register all installed packages in the new database.

PACKAGE REGISTRATION:

Code:
sudo /usr/local/sbin/pkg2ng

This may take awhile depending on how many packages you have installed.

PACKAGE SEARCHING:

Code:
pkg search packagesname

PHP Code:
[amzo@Bahamut ~]$ pkg search slim
slim
-1.3.4_2                   Graphical login manager for X11derived from Login.app 

PACKAGE INSTALLATION:

Code:
sudo pkg install packagename

PHP Code:
[amzo@Bahamut ~]$ sudo pkg install slim
Updating repository catalogue
Repository catalogue is up
-to-dateno need to fetch fresh copy
The following packages will be installed
:

    
Installing pkgconf0.8.5
    Installing perl
5.14.2_2
    Installing slim
1.3.4_2

The installation will 
require 48 MB more space

4 MB to be downloaded

Proceed with installing packages 
[y/N]: 

READING PKGUPDATING:

It is still recommended to read updating when upgrading ports, to solve issues.

PHP Code:
pkg updating pkg-config
20120726
:
  
AFFECTSusers of devel/pkg-config
  AUTHOR
bapt@FreeBSD.org

  devel
/pkg-config has been replaced by devel/pkgconf

  
# portmaster -o devel/pkgconf devel/pkg-config
  
or
  
# portupgrade -fo devel/pkgconf pkg-config-\*

  
pkgng:
  
# pkg set -o devel/pkg-config:devel/pkgconf
  # pkg install -f devel/pkgconf 

PHP Code:
sudo pkg set -o devel/pkg-config:devel/pkgconf
Change origin from devel
/pkg-config to devel/pkgconf for pkg-config-0.25_1? [y/N]: 

PHP Code:
sudo pkg install -f devel/pkgconf
Updating repository catalogue
Repository catalogue is up
-to-dateno need to fetch fresh copy
The following packages will be installed
:

    
Downgrading pkg-config0.25_1 -> 0.8.5

The installation will free 160 kB

0 B to be downloaded

Proceed with installing packages 
[y/N]: y
Checking integrity
... done
Downgrading pkg
-config from 0.25_1 to 0.8.5... done 

VERSION CHECKING:

PHP Code:
pkg version
ORBit2
-2.14.19                     =
Terminal-0.4.8                     <
Thunar-1.2.3                       

UPGRADING:

PHP Code:
sudo pkg upgrade
Updating repository catalogue
Repository catalogue is up
-to-dateno need to fetch fresh copy
The following packages will be upgraded
:

    
Upgrading libiconv1.13.1_1 -> 1.14
    Upgrading xlockmore
5.34 -> 5.40
    Upgrading xorg
-minimal7.5.1 -> 7.5.2

The installation will 
require 459 MB more space

125 MB to be downloaded

Proceed with upgrading packages 
[y/N]: 

I removed loads of package names from the list, the size needed to download is correct. :p

DELETE PACKAGES:

NOTE: WILL UPDATE AND COLORISE IN AN HOUR OR SO, GOTTA GO OUT so just posting what I've done so far. Screw saving drafts.


Messages In This Thread
[FreeBSD] Setting up pkgng - by Amzo - 31-08-2012, 06:49 AM
RE: [FreeBSD] Setting up pkgng - by FreeBSD - 03-09-2012, 10:32 PM
RE: [FreeBSD] Setting up pkgng - by zygotb - 19-10-2012, 08:55 AM
RE: [FreeBSD] Setting up pkgng - by Amzo - 19-10-2012, 10:01 AM