Re: pkg: sqlite error while executing UPDATE packages_ … pkgdb.c:2648: UNIQUE constraint failed: packages.name

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Tue, 28 Jun 2022 14:24:53 UTC
On Mon, Jun 27, 2022 at 08:59:52PM +0100, Graham Perrin wrote:
> From <https://pastebin.com/raw/uPExYGha>:
> 
> pkg: sqlite error while executing UPDATE packages SET name='py39-setuptools' WHERE id=44784 in file pkgdb.c:2648: UNIQUE constraint failed: packages.name
> pkg: sqlite error while executing UPDATE packages SET name='py39-sqlite3' WHERE id=45711 in file pkgdb.c:2648: UNIQUE constraint failed: packages.name
> 
> Please, should I be concerned?
> 
> Context: <https://github.com/freebsd/freebsd-ports/blob/f117f2c48552792743a74a931a49e76fc4a9c0f7/UPDATING#L8-L40>
> 
> TIA
> 


No you don't have to worry it means that you already have some py39 packages
installed.

The advice if pkg set is a bad advice and actually a broken advice. because the
version number will not be bumped, the only reason why it kind of works is
because pkg is clever enough to figure some dependencies are invalid anymore so
will pkg will request a reinstallation. So it is flawed.

Best regards,
Bapt