Re: pkg 2 ng conversion

2014-06-08 Thread Warren Block

On Sun, 8 Jun 2014, Jim Pazarena wrote:


On 2014-06-08 10:55 AM, Warren Block wrote:

On Sun, 8 Jun 2014, Jim Pazarena wrote:


No.  pkg is just a package manager.  It does not replace ports, it just
handles packages.  Like the old package manager, binary packages can be
downloaded and installed rather than ports, but the choice is yours.


Ahh.. therein lies the confusion. I have been compiling ports for many
years. However the compilations began nagging about converting pkg2ng.
So I investigated, and set the appropriate "WITH_PKGNG=yes" and ran
pkg2ng. But I never use packages. I always compile from ports.

So the warning appearing in each and every compile was & is very
misleading. Unless I am *still* confused !!


The package database tracks what is installed, whether it was built from 
a port or downloaded as a binary package.  The old package database is 
going away, and it's time to switch.  That's what pkg2ng does, reads the 
old installed packages database and writes the new format.

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


Re: pkg 2 ng conversion

2014-06-08 Thread Matthew Seaman
On 08/06/2014 20:59, Montgomery-Smith, Stephen wrote:
> Why did the change the database structure?  The old way had a separate
> directory for each port/package built.  The new way is to use a modern
> relational database.  So one advantage is the the new pkg database is
> much faster.  Maybe there are other advantages too.

Yes, absolutely.  Speed is one very big reason for switching to sqlite.
There are others

-  reliability.  It was depressingly easy to break the old style
   /var/db/pkg setup.  Especially in tracking reverse dependencies:
   ie. asking what depends on this package?

-  consistency.  The database schema simply makes it impossible to
   have duplicate versions of the same package in the pkgdb,
   something that was formerly a frequent problem.

-  It's a RDBMS with the power of SQL to pull out pretty much
   whatever information you could want about the packages you have
   installed.  SQL queries are much easier to write than grepping
   through /var/db/pkg and passing the results through some
   complicated post-processing pipeline to filter out the useful
   stuff.

Although one word of caution: we do tend to change the database schema
quite frequently, and occasionally in quite radical ways.  So, by all
means feel free to fire up 'pkg shell' and SQL away; just don't make
that an essential or even an important part of anything critical to your
livelihood.   Instead, use the tools like 'pkg query' or 'pkg info'
where we aim to provide a consistent API.

Cheers,

Matthew

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




signature.asc
Description: OpenPGP digital signature


Re: pkg 2 ng conversion

2014-06-08 Thread Kevin Oberman
On Sun, Jun 8, 2014 at 12:59 PM, Montgomery-Smith, Stephen <
step...@missouri.edu> wrote:

> On 06/08/2014 02:25 PM, Jim Pazarena wrote:
> > On 2014-06-08 10:55 AM, Warren Block wrote:
> >> On Sun, 8 Jun 2014, Jim Pazarena wrote:
> >>
> >>
> >> No.  pkg is just a package manager.  It does not replace ports, it just
> >> handles packages.  Like the old package manager, binary packages can be
> >> downloaded and installed rather than ports, but the choice is yours.
> >
> > Ahh.. therein lies the confusion. I have been compiling ports for many
> > years. However the compilations began nagging about converting pkg2ng.
> > So I investigated, and set the appropriate "WITH_PKGNG=yes" and ran
> > pkg2ng. But I never use packages. I always compile from ports.
> >
> > So the warning appearing in each and every compile was & is very
> > misleading. Unless I am *still* confused !!
>
> I still think you are confused.  pkg manages the database that stores
> which ports/packages are installed on your system.  Whether that
> particular piece of software came from building it using a port, or from
> downloading a binary package is immaterial.
>
> I think part of the confusion comes from the double use of the words
> package and/or port.  When you have, say, xorg-7.7 installed on your
> system, do you say you have the port xorg installed, or the package xorg
> installed?  Once it is installed it doesn't matter where it came from -
> port or package.  For whatever reason, people tend to call it a package
> once it is installed, even if it came from a port.
>
> For example, when you write "pkg info" in the new system, or "pkg_info"
> in the old system, it reads the database to tell you the list of
> packages/ports installed.  Now "pkg_info" and "pkg" assume a very
> different structure for the database.  That is why, if you have
> installed any ports or packages using the old system, you have to run
> pkg2ng.  It converts the database from one form to the other.  And that
> is why if you are using FreeBSD-9 or an older system, you have to add
> "WITH_PKGNG=yes" to make.conf, so that when more ports/packages are
> installed, it will update the new database and not the old.
>
> Why did the change the database structure?  The old way had a separate
> directory for each port/package built.  The new way is to use a modern
> relational database.  So one advantage is the the new pkg database is
> much faster.  Maybe there are other advantages too.
>
>
There are many advantages and speed is a minor one.

The one that I see as most significant is that the database schema will not
allow any port or package to be installed if there is a file that has the
same path as an installed one. This was actually a fairly common problem.
It was often noticed, perhaps fairly quickly, but often not, and a
CONFLICTS was added to the port, but until them, the second port simply
overwrote the older file. This seemed to happen most frequently with
documentation files.

The new database has blocks the installation of the new port until the
conflict is resolved. It does not prevent a port from being committed with
a conflict, but the conflict will be noted the first time someone tries to
install the ports and will them be fixed in one of several ways.
-- 
R. Kevin Oberman, Network Engineer, Retired
E-mail: rkober...@gmail.com
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: pkg 2 ng conversion

2014-06-08 Thread A.J. 'Fonz' van Werven
Jim Pazarena wrote:

> this process is a little confusing.
> do I still need to run "portsnap fetch" ?

PKGNG is a packaging system, not a building system.

If you need a ports tree (usually for BUILDING ports/packages from source,
although there are other reasons occasionally), then yes, you need to do a
  # portsnap fetch extract
or alternatively obtain a ports tree through Git or Subversion. If you
don't need a ports tree (for example because you'll only be installing
binary packages from a repository and don't need a ports tree for other
reasons), there's no need to use Portsnap either.

AvW

-- 
I'm not completely useless, I can be used as a bad example.


pgpTX5WduDnWU.pgp
Description: PGP signature


Re: pkg 2 ng conversion

2014-06-08 Thread Montgomery-Smith, Stephen
On 06/08/2014 02:25 PM, Jim Pazarena wrote:
> On 2014-06-08 10:55 AM, Warren Block wrote:
>> On Sun, 8 Jun 2014, Jim Pazarena wrote:
>>
>>
>> No.  pkg is just a package manager.  It does not replace ports, it just
>> handles packages.  Like the old package manager, binary packages can be
>> downloaded and installed rather than ports, but the choice is yours.
> 
> Ahh.. therein lies the confusion. I have been compiling ports for many
> years. However the compilations began nagging about converting pkg2ng.
> So I investigated, and set the appropriate "WITH_PKGNG=yes" and ran
> pkg2ng. But I never use packages. I always compile from ports.
> 
> So the warning appearing in each and every compile was & is very
> misleading. Unless I am *still* confused !!

I still think you are confused.  pkg manages the database that stores
which ports/packages are installed on your system.  Whether that
particular piece of software came from building it using a port, or from
downloading a binary package is immaterial.

I think part of the confusion comes from the double use of the words
package and/or port.  When you have, say, xorg-7.7 installed on your
system, do you say you have the port xorg installed, or the package xorg
installed?  Once it is installed it doesn't matter where it came from -
port or package.  For whatever reason, people tend to call it a package
once it is installed, even if it came from a port.

For example, when you write "pkg info" in the new system, or "pkg_info"
in the old system, it reads the database to tell you the list of
packages/ports installed.  Now "pkg_info" and "pkg" assume a very
different structure for the database.  That is why, if you have
installed any ports or packages using the old system, you have to run
pkg2ng.  It converts the database from one form to the other.  And that
is why if you are using FreeBSD-9 or an older system, you have to add
"WITH_PKGNG=yes" to make.conf, so that when more ports/packages are
installed, it will update the new database and not the old.

Why did the change the database structure?  The old way had a separate
directory for each port/package built.  The new way is to use a modern
relational database.  So one advantage is the the new pkg database is
much faster.  Maybe there are other advantages too.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: pkg 2 ng conversion

2014-06-08 Thread Michael Gmelin


> On 08 Jun 2014, at 21:25, Jim Pazarena  wrote:
> 
>> On 2014-06-08 10:55 AM, Warren Block wrote:
>> On Sun, 8 Jun 2014, Jim Pazarena wrote:
>> 
>> 
>> No.  pkg is just a package manager.  It does not replace ports, it just
>> handles packages.  Like the old package manager, binary packages can be
>> downloaded and installed rather than ports, but the choice is yours.
> 
> Ahh.. therein lies the confusion. I have been compiling ports for many
> years. However the compilations began nagging about converting pkg2ng.
> So I investigated, and set the appropriate "WITH_PKGNG=yes" and ran
> pkg2ng. But I never use packages. I always compile from ports.
> 
> So the warning appearing in each and every compile was & is very
> misleading. Unless I am *still* confused !!

Not really. If you build from ports that results in a binary package that is 
installed using the package manager. Old pkg_* tools won't be supported after 
September 1st, so this directly affects you, even if you build all ports 
yourself.


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


Re: pkg 2 ng conversion

2014-06-08 Thread Jim Pazarena

On 2014-06-08 10:55 AM, Warren Block wrote:

On Sun, 8 Jun 2014, Jim Pazarena wrote:


No.  pkg is just a package manager.  It does not replace ports, it just
handles packages.  Like the old package manager, binary packages can be
downloaded and installed rather than ports, but the choice is yours.


Ahh.. therein lies the confusion. I have been compiling ports for many
years. However the compilations began nagging about converting pkg2ng.
So I investigated, and set the appropriate "WITH_PKGNG=yes" and ran
pkg2ng. But I never use packages. I always compile from ports.

So the warning appearing in each and every compile was & is very
misleading. Unless I am *still* confused !!
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: pkg 2 ng conversion

2014-06-08 Thread Warren Block

On Sun, 8 Jun 2014, Jim Pazarena wrote:


On 2014-05-28 11:30 AM, Jim Ohlstein wrote:

Hello,

On 5/28/14, 2:13 PM, Jim Pazarena wrote:


On a new/fresh install, V10, should a person immediately place
"WITH_PKGNG=yes" in the make.conf ? And then is it not required
to run pkg2ng ? Or is it implied? It seems not, but I cannot find
documentation in this respect.


In my experience it is unnecessary to add "WITH_PKGNG=yes" in a fresh
FreeBSD 10 box, and it is certainly not necessary to run pkg2ng since
there are no installed packages.

The pkg_* tools are not included in FreeBSD 10 and the pkg(ng) system is
the default.



this process is a little confusing.
do I still need to run "portsnap fetch" ?


If you build from ports and wish to continue using them, then yes, 
continue to use portsnap or svn to update the ports tree.



Or does this need to be replaced with some other ng style update?


No.  pkg is just a package manager.  It does not replace ports, it just 
handles packages.  Like the old package manager, binary packages can be 
downloaded and installed rather than ports, but the choice is yours.

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


Re: pkg 2 ng conversion

2014-06-08 Thread Jim Pazarena

On 2014-05-28 11:30 AM, Jim Ohlstein wrote:

Hello,

On 5/28/14, 2:13 PM, Jim Pazarena wrote:


On a new/fresh install, V10, should a person immediately place
"WITH_PKGNG=yes" in the make.conf ? And then is it not required
to run pkg2ng ? Or is it implied? It seems not, but I cannot find
documentation in this respect.


In my experience it is unnecessary to add "WITH_PKGNG=yes" in a fresh
FreeBSD 10 box, and it is certainly not necessary to run pkg2ng since
there are no installed packages.

The pkg_* tools are not included in FreeBSD 10 and the pkg(ng) system is
the default.



this process is a little confusing.
do I still need to run "portsnap fetch" ?

Or does this need to be replaced with some other ng style update?
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: pkg 2 ng conversion

2014-05-28 Thread Jim Ohlstein

Hello,

On 5/28/14, 2:13 PM, Jim Pazarena wrote:

I have several servers, some 9.1, 9.2, 10.0
all nagging about the deprecated package system.
So I've bitten the bullet and am converting to the new pkg system.
The notes for conversion indicate you must add "WITH_PKGNG=yes" to
make.conf. Also done.

On a new/fresh install, V10, should a person immediately place
"WITH_PKGNG=yes" in the make.conf ? And then is it not required
to run pkg2ng ? Or is it implied? It seems not, but I cannot find
documentation in this respect.


In my experience it is unnecessary to add "WITH_PKGNG=yes" in a fresh 
FreeBSD 10 box, and it is certainly not necessary to run pkg2ng since 
there are no installed packages.


The pkg_* tools are not included in FreeBSD 10 and the pkg(ng) system is 
the default.


--
Jim Ohlstein


"Never argue with a fool, onlookers may not be able to tell the 
difference." - Mark Twain

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


Re: pkg 2 ng conversion

2014-05-28 Thread Matthew Seaman
On 28/05/2014 19:13, Jim Pazarena wrote:
> On a new/fresh install, V10, should a person immediately place
> "WITH_PKGNG=yes" in the make.conf ? And then is it not required
> to run pkg2ng ? Or is it implied? It seems not, but I cannot find
> documentation in this respect.

It's not necessary on 10.x -- you get that setting by default.  Also, if
you've never touched pkg_tools on a new install, you don't need to run
pkg2ng[*].  Just start by installing pkg(8) and then us it to install
whatever else you want installed.

Cheers,

Matthew

[*] Although in this case, it will do no harm.  Also you might like the
periodic.conf update you can get by running 'pkg2ng -p'

-- 
Dr Matthew J Seaman MA, D.Phil.

PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matt...@infracaninophile.co.uk



signature.asc
Description: OpenPGP digital signature