pkgng question

Matthew Seaman m.seaman at infracaninophile.co.uk
Sat Jul 26 09:17:12 UTC 2014


On 25/07/2014 23:30, doug wrote:
> I started with a 9.2-release system with xfce-4.10_5 plus related/needed
> other stuff and did the following: freebsd-update to 9.2-RELEASE-p10 #0;
> updated ports with portsnap; and finally installed pgk via pkg_add.
> 
> So to try some things I did: 'pkg info' which looked okay; 'pkg check -d
> -n -a' returned no ouput, I figured no news was good news. For pkg stats
> I got:
> 
>     Local package database:
>             Installed packages: 418
>             Disk space occupied: 1 GB
> 
> Still cool. Then I tried 'pkg upgrade -n' and got 'Nothing to do' after
> several hundred of the following:
>    "pkg: sqlite: near "ORDER": syntax error (pkgdb.c:3186)"
> 
> probably 418 lines but written to SYSERROR so difficult to count.
> Several questions come to mind:
> 
>   1) The system was build around Dec 2013, so I think 'nothing to do is
> probably
>      not the right answer.
> 
>   2) Are the sql errors correct? Probably because you can not order the
> null
>      set but should be suppressed??
> 
> I am late to the game but I did scan PRs and questions before asking.
> 
> An unrelated question. Everything I used seems to be there except for
> pkg_tree. Perhaps the need goes away but I would not expect an
> autoupdate of 418 packages to work after 7 months of no changes.
> pkg_tree was helpful in attacking upgrading in cases I did not want to
> delete all and start again.
> 
> Thanks for any thoughts and/or guidence

Which version of pkg(8) did you first install, and have you upgraded it
since?  Where did you get pkg(8) from?  Can you show us the output of
'pkg -vv' please?

The sqlite syntax error is a bug in pkg(8), but there have been many
similar addressed over time.  There's two possibilities here: either the
sqlite schema on your system is corrupt, or your version of pkg(8) is
producing incorrect SQL.

You can get pkg(8) to print out the SQL it is running by calling with
debugging turned up to 4:

    env DEBUG_LEVEL=4 pkg upgrade -n

If it turns out the pkg is producing mangled SQL then you can probably
cure the problem by forcibly upgrading to the latest.  Careful though:
if it's your local.sqlite that's wrong here, then forcibly upgrading
pkg(8) could just be making things worse.

	Cheers,

	Matthew

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

PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matthew at infracaninophile.co.uk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1036 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20140726/c3662461/attachment.sig>


More information about the freebsd-questions mailing list