Re: After following the advise from UPDATING about pythoin-3.11, 'pkg add' now says: pkg: "Cannot solve problem using SAT solver" and attempts to install and then offers to remove py39- packages

From: Tomoaki AOKI <junchoon_at_dec.sakura.ne.jp>
Date: Mon, 10 Jun 2024 11:58:03 UTC
On Mon, 10 Jun 2024 16:52:59 +0900
Tatsuki Makino <tatsuki_makino@hotmail.com> wrote:

> Hmmm,
> 
> I have never used poudriere to create all the packages.
> However, since I was using the STABLE version for my jail, I have lost all the packages I have built on several occasions.
> 
> It seems to happen when the value returned by the uname -KU of the jail changes.
> 
> It seems that poudriere-pkgclean is the only other way to get rid of packages that can no longer be traced from the port tree.
> 
> If the package directory is not cleaned of unnecessary packages, poudriere-bulk creates a repository that also contains the packages.
> In fact, my poudriere repository includes llvm70-7.0.1_8.pkg and seamonkey-2.49.4_27.pkg.
> Also, if the package name is the same but the version is different, it seems to be a repository that has no problem providing it.
> 
> I have such a rule of thumb :)

With my experience, poudriere deletes all the packages in its local
repo for the jail when

  1.ABI changed (i.e., 13 to 14, i386 to amd64),

  2.__FreeBSD_version is bumped in src/sys/sys/param.h,

  3.Any of TYPE, REVISION and/or BRANCH in src/sys/conf/newvers.sh
    are bumped.

if `-a` is specified for all still lives in ports rtree.

Each of them affects `uname -KU`.

And possibly, not sure actually which is, something in toolchains are
changed (not all changes affects).

I think poudriere would be better ignoring last 3 (at least 2) digits
of __FreeBSD_version for stable, releng and release branches, as
API/KPI (not ABI/KBI, unfortunately) are basically assured to be
downward compatible within each of those branches.

FYI:
I have a small script to list all pakcages installed, excluding
  *ports marked as deleted (no successor specified) in MOVED.
  *ports origin (can specify flavor) to igonore listed in BLOCKLIST
   variable in the script
at brew.bsd.cafe repo [1].

With the list generated by the script, you can ignore huge LEAVES like
www/chromium to be ignored to build. See the README.md there for
details.


[1]
https://brew.bsd.cafe/TomAoki/sh_scripts/src/branch/main/poudlist-all

Regards.

> 
> Regards.
> 
> Yuri wrote on 2024/06/09 12:30:
> > You are right. Package DB contains both py39- and py311- packages:
> > $ pkg search py311- | wc
> >    4477   33240  346412
> > $ pkg search py39- | wc
> >    3506   25946  270059
> > Since pkg has no awareness of the current python version - it attempts to install all found candidates for each particular PKGORIGIN.
> > Anybody knows what caused this regression in the package database?


-- 
Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>