Bug 223751 - ports-mgmt/pkg: unable to pkg upgrade: Assertion failed: (strcmp(uid, p->uid) != 0) Checking integrity...Assertion failed: (strcmp(uid, p->uid) != 0), function pkg_conflicts_check_local_path, file pkg_jobs_conflicts.c, line 386
Summary: ports-mgmt/pkg: unable to pkg upgrade: Assertion failed: (strcmp(uid, p->uid)...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-pkg mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-19 15:44 UTC by x11max1@unitybox.de
Modified: 2019-07-12 16:03 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description x11max1@unitybox.de 2017-11-19 15:44:18 UTC
root@freebsd:~ # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (370 candidates): 100%
Processing candidates (370 candidates): 100%
Checking integrity...Assertion failed: (strcmp(uid, p->uid) != 0), function pkg_conflicts_check_local_path, file pkg_jobs_conflicts.c, line 386.
Child process pid=21111 terminated abnormally: Abort trap

-rw-------   1 root  wheel  49291264 Nov 19 16:43 pkg.core

root@freebsd:~ # pkg -v
1.10.1

root@freebsd:~ # uname -a
FreeBSD freebsd 11.1-RELEASE-p1 FreeBSD 11.1-RELEASE-p1 #0: Wed Aug  9 11:55:48 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

An "pkg upgrade -f" also ends up with the same result: "Assertion failed:...."
Comment 1 x11max1@unitybox.de 2017-11-20 12:58:30 UTC
I found out - in my case - what the problem is if "pkg upgrade" fails.

Running "pkg check -s -a" shows some errors.  

- "missing file"
- "checksum mismatch"

For example: 
root@freebsd:~ # pkg check -s -a

ImageMagick-6.9.9.15,1: missing file /usr/local/etc/ImageMagick-6/coder.xml.sample
ImageMagick-6.9.9.15,1: missing file /usr/local/etc/ImageMagick-6/colors.xml.sample
ImageMagick-6.9.9.15,1: missing file /usr/local/etc/ImageMagick-6/log.xml.sample
ImageMagick-6.9.9.15,1: missing file /usr/local/etc/ImageMagick-6/magic.xml.sample

urwfonts-ttf-1.0.7b18_6: checksum mismatch for /usr/local/share/fonts/urwfonts-ttf/fonts.dir
urwfonts-ttf-1.0.7b18_6: checksum mismatch for /usr/local/share/fonts/urwfonts-ttf/fonts.scale

That is why "pkg upgrade" couldn't run successfully.

Reinstalling the relevat packages solved my problem with pkg.

root@freebsd:~ # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (217 candidates): 100%
Processing candidates (217 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
root@freebsd:~ #
Comment 2 randy 2019-07-12 15:57:16 UTC
not sure this is same issue, but ...

# pkg check -s -a
Checking all packages: 100%
# pkg upgrade -f
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (334 candidates):  81%
glib12 has no direct installation candidates, change it to glib? [Y/n]: 
Checking for upgrades (334 candidates): 100%
Processing candidates (334 candidates): 100%
pkg: sqlite error while executing UPDATE packages SET name=?1  WHERE name=?2; in file pkg_jobs.c:1731: UNIQUE constraint failed: packages.name
Checking integrity...Assertion failed: (strcmp(uid, p->uid) != 0), function pkg_conflicts_check_local_path, file pkg_jobs_conflicts.c, line 386.
Child process pid=60253 terminated abnormally: Abort trap

# uname -a
FreeBSD foux.com 11.3-RELEASE FreeBSD 11.3-RELEASE #0 r349754: Fri Jul  5 04:45:24 UTC 2019     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
Comment 3 randy 2019-07-12 16:03:07 UTC
(In reply to randy from comment #2)
ignore.  not same issue