pkg-2.0.4
pkg prime-origins (Doesn't work no results)
pkg query -e '%a = 0' '%o' | sort -u (works, and it should be the alias of the prime-origins)
pkg alias
pkg-2.0.4
pkg prime-origins (Doesn't work no results)
pkg query -e '%a = 0' '%o' | sort -u (works, and it should be the alias of the prime-origins)
pkg alias
This does not seem related to pkg(8) v. 2.0.y; I'm seeing this too with v. 1.21.3.pkg-2.0.4
pkg prime-origins (Doesn't work no results)
pkg query -e '%a = 0' '%o' | sort -u (works, and it should be the alias of the prime-origins)
pkg alias
prime-origins 'query -e '%a = 0' '%o' | sort -u'
prime-origins 'query -e '%a = 0' '%o' | uniq | sort'
[0-0] # pkg -v
1.21.3
[1-0] # pkg -vv | sed -n -e '/DEBUG/ p' -e '/^Repositories:/,$ p'
DBG(1)[2298]> PkgConfig: loading repositories in /etc/pkg/
DBG(1)[2298]> PKgConfig: loading /etc/pkg//FreeBSD.conf
DBG(1)[2298]> PkgConfig: parsing key 'FreeBSD'
DBG(1)[2298]> PkgConfig: parsing repository object FreeBSD
DBG(1)[2298]> PkgConfig: loading repositories in /usr/local/etc/pkg/repos/
DBG(1)[2298]> PKgConfig: loading /usr/local/etc/pkg/repos//FreeBSD.conf
DBG(1)[2298]> PkgConfig: parsing key 'FreeBSD'
DBG(1)[2298]> PkgConfig: overwriting repository FreeBSD
DBG(1)[2298]> PkgConfig: parsing repository object FreeBSD
DBG(1)[2298]> PKgConfig: loading /usr/local/etc/pkg/repos//kmods.conf
DBG(1)[2298]> PkgConfig: parsing key 'FreeBSD-kmods'
DBG(1)[2298]> PkgConfig: parsing repository object FreeBSD-kmods
DEBUG_SCRIPTS = false;
DEBUG_LEVEL = 4;
Repositories:
FreeBSD: {
url : "pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/latest",
enabled : yes,
priority : 0,
mirror_type : "SRV",
signature_type : "FINGERPRINTS",
fingerprints : "/usr/share/keys/pkg"
}
FreeBSD-kmods: {
url : "pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/kmods_latest_2",
enabled : yes,
priority : 0,
mirror_type : "SRV",
signature_type : "FINGERPRINTS",
fingerprints : "/usr/share/keys/pkg"
}
[2-0] # pkg alias prime-origins
DBG(1)[2301]> PkgConfig: loading repositories in /etc/pkg/
DBG(1)[2301]> PKgConfig: loading /etc/pkg//FreeBSD.conf
DBG(1)[2301]> PkgConfig: parsing key 'FreeBSD'
DBG(1)[2301]> PkgConfig: parsing repository object FreeBSD
DBG(1)[2301]> PkgConfig: loading repositories in /usr/local/etc/pkg/repos/
DBG(1)[2301]> PKgConfig: loading /usr/local/etc/pkg/repos//FreeBSD.conf
DBG(1)[2301]> PkgConfig: parsing key 'FreeBSD'
DBG(1)[2301]> PkgConfig: overwriting repository FreeBSD
DBG(1)[2301]> PkgConfig: parsing repository object FreeBSD
DBG(1)[2301]> PKgConfig: loading /usr/local/etc/pkg/repos//kmods.conf
DBG(1)[2301]> PkgConfig: parsing key 'FreeBSD-kmods'
DBG(1)[2301]> PkgConfig: parsing repository object FreeBSD-kmods
prime-origins 'query -e '%a = 0' '%o' | sort -u'
[3-0] # pkg prime-origins
DBG(1)[2305]> PkgConfig: loading repositories in /etc/pkg/
DBG(1)[2305]> PKgConfig: loading /etc/pkg//FreeBSD.conf
DBG(1)[2305]> PkgConfig: parsing key 'FreeBSD'
DBG(1)[2305]> PkgConfig: parsing repository object FreeBSD
DBG(1)[2305]> PkgConfig: loading repositories in /usr/local/etc/pkg/repos/
DBG(1)[2305]> PKgConfig: loading /usr/local/etc/pkg/repos//FreeBSD.conf
DBG(1)[2305]> PkgConfig: parsing key 'FreeBSD'
DBG(1)[2305]> PkgConfig: overwriting repository FreeBSD
DBG(1)[2305]> PkgConfig: parsing repository object FreeBSD
DBG(1)[2305]> PKgConfig: loading /usr/local/etc/pkg/repos//kmods.conf
DBG(1)[2305]> PkgConfig: parsing key 'FreeBSD-kmods'
DBG(1)[2305]> PkgConfig: parsing repository object FreeBSD-kmods
DBG(4)[2305]> Pkgdb: running: 'PRAGMA user_version;'
DBG(4)[2305]> Pkgdb: executing 'PRAGMA foreign_keys = ON;'
DBG(4)[2305]> Pkgdb: executing 'PRAGMA mmap_size=268435456;'
DBG(4)[2305]> Pkgdb: running: 'WITH flavors AS (SELECT package_id, value.annotation AS flavor FROM pkg_annotation LEFT JOIN annotation tag ON pkg_annotation.tag_id = tag.annotation_id LEFT JOIN annotation value ON pkg_annotation.value_id = value.annotation_id WHERE tag.annotation = 'flavor') SELECT DISTINCT(p.id), origin, p.name, p.name as uniqueid, version, comment, desc, message, arch, maintainer, www, prefix, flatsize, licenselogic, automatic, locked, time, manifestdigest, vital FROM packages AS p LEFT JOIN pkg_categories ON p.id = pkg_categories.package_id LEFT JOIN categories ON categories.id = pkg_categories.category_id LEFT JOIN flavors ON flavors.package_id = p.id WHERE (p.name = '|' COLLATE NOCASE OR p.name || '-' || version = '|' COLLATE NOCASE) AND (automatic=0) ORDER BY p.name;'
DBG(4)[2305]> Pkgdb: running: 'WITH flavors AS (SELECT package_id, value.annotation AS flavor FROM pkg_annotation LEFT JOIN annotation tag ON pkg_annotation.tag_id = tag.annotation_id LEFT JOIN annotation value ON pkg_annotation.value_id = value.annotation_id WHERE tag.annotation = 'flavor') SELECT DISTINCT(p.id), origin, p.name, p.name as uniqueid, version, comment, desc, message, arch, maintainer, www, prefix, flatsize, licenselogic, automatic, locked, time, manifestdigest, vital FROM packages AS p LEFT JOIN pkg_categories ON p.id = pkg_categories.package_id LEFT JOIN categories ON categories.id = pkg_categories.category_id LEFT JOIN flavors ON flavors.package_id = p.id WHERE (p.name = 'sort' COLLATE NOCASE OR p.name || '-' || version = 'sort' COLLATE NOCASE) AND (automatic=0) ORDER BY p.name;'
DBG(4)[2305]> Pkgdb: running: 'WITH flavors AS (SELECT package_id, value.annotation AS flavor FROM pkg_annotation LEFT JOIN annotation tag ON pkg_annotation.tag_id = tag.annotation_id LEFT JOIN annotation value ON pkg_annotation.value_id = value.annotation_id WHERE tag.annotation = 'flavor') SELECT DISTINCT(p.id), origin, p.name, p.name as uniqueid, version, comment, desc, message, arch, maintainer, www, prefix, flatsize, licenselogic, automatic, locked, time, manifestdigest, vital FROM packages AS p LEFT JOIN pkg_categories ON p.id = pkg_categories.package_id LEFT JOIN categories ON categories.id = pkg_categories.category_id LEFT JOIN flavors ON flavors.package_id = p.id WHERE (p.name = '-u' COLLATE NOCASE OR p.name || '-' || version = '-u' COLLATE NOCASE) AND (automatic=0) ORDER BY p.name;'
[4->1<] #
[20-0] # pkg alias ppp
ppp 'query -e '%a = 0' '%o''
[21-0] # pkg ppp | sort -u
misc/freebsd-doc-nl
<snap>
x11/xorg
[22-0] #
prime-origins = "query -e '%a = 0' '%o'";
...WHERE (p.name = '|' COLLATE NOCASE OR p.name || '-' || version = '|' COLLATE NOCASE) AND (automatic=0) ORDER BY p.name;'
...WHERE (p.name = 'sort' COLLATE NOCASE OR p.name || '-' || version = 'sort' COLLATE NOCASE) AND (automatic=0) ORDER BY p.name;'
..WHERE (p.name = '-u' COLLATE NOCASE OR p.name || '-' || version = '-u' COLLATE NOCASE) AND (automatic=0) ORDER BY p.name;
-e, --evaluate
Match packages using the given evaluation-condition. See
EVALUATION FORMAT for details.
Yes, it should not be part of the query; it starts by parsing theThe pkg query take the entire string from the quotes after "-e" including the "| sort -u" into the sql query
|
and further symbols, and incorporating these in the query, textually seen after an occurrence of a LEFT JOIN.Given its definition in pkg-query(8):man pkg-query
<non-quotable quote>
EVALUATION FORMAT
Packages can be selected by using expressions comparing Variables (see
below) to string or integer values. The mode of comparison is speci-
fied by the Operator (also listed below). Expressions can be combined
using && (for and) and || (for or). Parentheses can be used for group-
ing in the usual manner.
pkg info -x krita
pkg: No package(s) matching krita
sudo pkg install krita
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Updating database digests format: 100%
Checking integrity... done (1 conflicting)
- libebur128-1.2.6 conflicts with ebur128-0.1.10_2 on /usr/local/include/ebur128.h
Cannot solve problem using SAT solver, trying another plan
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
pkg info -x ebur
pkg: No package(s) matching ebur
pkg info -x ebur128
pkg: No package(s) matching ebur128
pkg info -x libebur128
pkg: No package(s) matching libebur128
# pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (38 candidates): 100%
Processing candidates (38 candidates): 100%
Checking integrity... done (1 conflicting)
- webkit2-gtk_40-2.46.5_1 conflicts with webkit2-gtk3-2.34.6_10 on /usr/local/include/webkitgtk-4.0/JavaScriptCore/JSBase.h
Assertion failed: (j->system_shlibs == NULL), function pkg_jobs_solve, file pkg_jobs.c, line 1919.
Child process pid=77820 terminated abnormally: Abort trap
I don't have a fix for 2.0.5, but in case you'd consider downgrading pkg, krita-5.2.6_2 installs fine with my pkg 1.21.3 on 'latest'.Does anyone know of a fix?
Yes more testing would have been good. But I would say that this is something that might happen from time to time on a development track, as latest pkg repo is. If you want stable choose quarterly. There things like this should hopefully not happen.If I were on the dev team, I'd take all this info as a sign of trouble and lack of QA testing... pkg 2.x REALLY should not have been released, and instead limited to 15-CURRENT.
Just reading this thread, it's about a very basic, very important component of FreeBSD - breaking. Development of other, very useful software for FreeBSD quite frankly depends on having a working pkg available on a barebones installation...
I have pkg 1.21.x, it works fine, but if 2.x is broken to such an extent, is there a way to stop this runaway train before it breaks everything else?
'Cause, y'know, if this breaks, not even presence of other useful components like ZFS, ifconfig can really save my image of FreeBSD as a rock-solid OS from shattering. It is kind of too much to expect rank-and-file users to monitor how pkg behaves and to know how to troubleshoot your way out of a train wreck.
This kind of misses the point. If you read the whole thread, you'd see that the problem is not the repo, but a basic system component.But I would say that this is something that might happen from time to time on a development track, as latest pkg repo is. If you want stable choose quarterly.
-CURRENT
tag exists, y'know.It's a problem in quarterly:If you want stable choose quarterly. There things like this should hopefully not happen.
[gunsynd.552] $ uname -a
FreeBSD gunsynd.oakes.consulting 13.4-RELEASE-p1 FreeBSD 13.4-RELEASE-p1 GENERIC amd64
[gunsynd.553] $ grep ABI /etc/pkg/FreeBSD.conf
url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
[gunsynd.554] $ pkg info | grep "Package manager"
pkg-2.0.0 Package manager
I concur. Plus my thanks to those contributing above.And what is important: The developers are working to fix things as fast as possible. There could is a need of more manpower in the FreeBSD development. And I would say in this case they show their commitment. So a big "THANK YOU" from me.
Unfortunatly, I'm inclined to think that a signifcant large number of FreeBSD users did not recognise the upgrade of pkg(8) as a potential big problem, and they do not have that kind of experience, intuition or foresight, saving them from annoyance, or worse, harm. As there also has been no announcement of a pending big version change and its possible impact (both on latest and quarterly), it is easy to underestimate its possible consequences. Nor has there been any general announcement of current problems.I recognised a problem that had hurt me previously (gratuitous package deletion), and declined updates immediately after pkg-2.0.0 got installed. Some experience, some vigilance, and some luck have saved me from harm
(previous response: withdrawn)It's a problem in quarterly:
Code:[gunsynd.552] $ uname -a FreeBSD gunsynd.oakes.consulting 13.4-RELEASE-p1 FreeBSD 13.4-RELEASE-p1 GENERIC amd64 [gunsynd.553] $ grep ABI /etc/pkg/FreeBSD.conf url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly", [gunsynd.554] $ pkg info | grep "Package manager" pkg-2.0.0 Package manager
I wasn't having it, I installed GhostBSD instead.There would be 2 solutions.
- Wait until everything depending upon graphics/librsvg2-rust (say, missingly linked against graphics/librsvg2) and you actually need are rebuilt and ready on the official repo.
- If you already have up-to-date ports tree in hand (or do not hesitated to clone and maintain local clone of official repo yourself) and enough computer resources (CPU, memory, disk and of course including your time), build them locally yourself.
An educated guess is that the pkg bootstrap code is looking somewhere other than the regular pkg repo that is specified by pkg.conf (Latest, Main, or Quarterly), when fetching an update to pkg(8).Unfortunatly, I'm inclined to think that a signifcant large number of FreeBSD users did not recognise the upgrade of pkg(8) as a potential big problem, and they do not have that kind of experience, intuition or foresight, saving them from annoyance, or worse, harm. As there also has been no announcement of a pending big version change and its possible impact (both on latest and quarterly), it is easy to underestimate its possible consequences. Nor has there been any general announcement of current problems.
(previous response: withdrawn)
Perhaps I'm missing something but, in pkg - 2025Q1, aka quarterly, I see only version 1.21.3; as in Makefile - commit history - 2025Q1 pkg(8)
How did you get this using quarterly?
main
. And sure enough, that's where I found the commit history that includes pkg 2.x upgrades. But that still doesn't explain how such an important system component could find its way from what's frankly A: experimental code in the main branch of ports repo into B: a hard-to-control OS component update that has the potential to really break the system.I don't understand why they are first sorting the SQL output by package name instead of the origin and then want to pipe the output to the external "sort" program and perform another (double) sort of the result while they can perform a single sort operation at the SQL query at the begging so instead of sorting with ORDER BY p.name they can use "origin"Given its definition in pkg-query(8):
I don't see how a pipe (or any other shell construct) can be incorporated in a pkg-query in agreement with how it is defined now.Code:EVALUATION FORMAT Packages can be selected by using expressions comparing Variables (see below) to string or integer values. The mode of comparison is speci- fied by the Operator (also listed below). Expressions can be combined using && (for and) and || (for or). Parentheses can be used for group- ing in the usual manner.
--- /usr/ports/ports-mgmt/pkg/work/pkg-2.0.4/libpkg/pkgdb_query.c 2025-01-26 15:19:52.000000000 +0200
+++ /root/pkgdb_query.c 2025-01-29 09:43:36.424362000 +0200
@@ -162,7 +162,7 @@
" LEFT JOIN pkg_categories ON p.id = pkg_categories.package_id "
" LEFT JOIN categories ON categories.id = pkg_categories.category_id "
" LEFT JOIN flavors ON flavors.package_id = p.id "
- " %s %s (%s) ORDER BY p.name;",
+ " %s %s (%s) ORDER BY origin;",
comp, pattern == NULL ? "WHERE" : "AND", cond + 7);
} else if (match == MATCH_INTERNAL) {
sqlite3_snprintf(sizeof(sql), sql,
I think, no. At least not 100% yes.If I were on the dev team, I'd take all this info as a sign of trouble and lack of QA testing...
This situation looks complexed and confusing to me.Looking at the ports mailing list, it appears that pkg 2.0 also influences port builds, at least poudriere builds have been reported to be impacted negatively by pkg 2.0.x.
Yes. Me, too, think this is the problem. But more severe problem is that neither /usr/ports/CHANGES nor /usr/ports/UPDATING contain about this.The introduction of pkg v. 2.0 (or its possible impact) has not been announced on the pkg or ports mailing list, or, as far as I can tell anywhere else.
Test build usingSome breaks on built (at least math/openblas).
make
in bare-metal math/openblas directory finished with the same error (crash with SIGBUS, seems to be invoked by division by zero) as in poudriere jail. The point pkg could affect would be much later.The way I see it, there's a chance that the devs are trying to address some existing complaints that we all had at some point about the dependency resolution mechanism. That's an understandable goal, but come on, there should be a way to limit this rollout of the new pkg(8) to 15-CURRENT instead of mucking up stable releases for users. That was successfully done with graphics/drm-kmod (limiting 6.1 to 13.1-RELEASE and newer), so why not apply the same ideas to ports-mgmt/pkg?This situation looks complexed and confusing to me.
I can't say clearly as I cannot track the whole bunch of commits to ports tree, but commits not directly related with pkg could be "mangling" things.
Some breaks on built (at least math/openblas). Some seems to be inproper dependency changes on pkgs in official repo (attempts to pull in devel/llvm*@lite while corresponding devel/llvm* is already installed and depended upon by existing and not bumped pkgs, for example).
Yes. Me, too, think this is the problem. But more severe problem is that neither /usr/ports/CHANGES nor /usr/ports/UPDATING contain about this.
Even missed to announce on ML, at least one of the files should have cautions.
Well, in my humble opinion, as there is ports-mgmt/pkg-devel, what about default it for main branch of base (currently, 15-Current) and others defaulted to non-devel ports-mgmt/pkg?That's an understandable goal, but come on, there should be a way to limit this rollout of the new pkg(8) to 15-CURRENT instead of mucking up stable releases for users.