If I do a base install to a new root:
setup-x86_64.exe --root "$(cygpath -wa .cygtest)" --no-admin \
--no-shortcuts --no-replaceonreboot --no-version-check \
--prune-install --verbose
And then run the same install again, I get:
libsolv: orphaned packages:
libsolv: base-0.0-0.any (erased)
libsolv: _windows-10.0.19045.any (kept)
libsolv:
libsolv: ordering transaction
libsolv: transaction elements: 33
libsolv: edges: 41, edge space: 70
libsolv: edge creation took 0 ms
libsolv: cycles broken: 0
libsolv: cycle breaking took 0 ms
libsolv: invedge space: 76
libsolv: creating new transaction took 0 ms
libsolv: transaction ordering took 0 ms
libsolv: 33 erased packages:
libsolv: - base-0.0-0.any
libsolv: - ca-certificates-2023.2.62_v7.0.401-2.any
libsolv: - cygutils-1.4.17-1.any
libsolv: - file-5.44-1.any
libsolv: - gawk-5.3.0-1.any
libsolv: - groff-1.23.0-1.any
libsolv: - less-643-1.any
libsolv: - libfdisk1-2.39.3-2.any
libsolv: - libffi6-3.2.1-2.any
libsolv: - libgdbm6-1.18.1-1.any
libsolv: - liblz4_1-1.9.4-1.any
libsolv: - liblzma5-5.6.2-1.any
libsolv: - libmpfr6-4.2.1-1.any
libsolv: - libp11-kit0-0.23.20-1.any
libsolv: - libpcre1-8.45-1.any
libsolv: - libpipeline1-1.5.6-1.any
libsolv: - libpopt-common-1.19-1.any
libsolv: - libpopt0-1.19-1.any
libsolv: - libsmartcols1-2.39.3-2.any
libsolv: - libssl1.1-1.1.1w-1.any
libsolv: - libssl3-3.0.14-1.any
libsolv: - libstdc++6-11.4.0-1.any
libsolv: - libtasn1_6-4.14-1.any
libsolv: - libuchardet0-0.0.8-1.any
libsolv: - libuuid1-2.39.3-2.any
libsolv: - man-db-2.12.1-1.any
libsolv: - openssl-3.0.14-1.any
libsolv: - p11-kit-0.23.20-1.any
libsolv: - p11-kit-trust-0.23.20-1.any
libsolv: - tar-1.35-2.any
libsolv: - util-linux-2.39.3-2.any
libsolv: - xz-5.6.2-1.any
libsolv: - zstd-1.5.6-1.any
libsolv:
Can't happen. No packagemeta for base
The "Can't happen" error results in all following transactions being skipped:
// Can't happen - throw an exception?
{
Log (LOG_PLAIN) << "Can't happen. No packagemeta for "
<< pv.Name() << endLog;
return;
}
This results in setup always showing no pending changes, even if you
have installed additional packages that should be pruned by
--prune-install, or if setup.ini has different contents.
The problem seems to be that we use SOLVER_ERASE jobs to remove all
non-base installed packages, and they take precedence over keeping the
pseudo-package 'base' installed.
Making the erase jobs weak seems to solve the problem:
diff --git a/libsolv.cc b/libsolv.cc
index 3f083a4..95f21a2 100644
--- a/libsolv.cc
+++ b/libsolv.cc
@@ -850,7 +850,7 @@ SolverSolution::tasksToJobs(SolverTasks &tasks, updateMode
update, Queue &job)
queue_push2(&job, SOLVER_INSTALL | SOLVER_SOLVABLE_PROVIDES,
sv.name_id());
break;
case SolverTasks::taskUninstall:
- queue_push2(&job, SOLVER_ERASE | SOLVER_SOLVABLE, sv.id);
+ queue_push2(&job, SOLVER_ERASE | SOLVER_WEAK | SOLVER_SOLVABLE,
sv.id);
break;
case SolverTasks::taskReinstall:
// we don't know how to ask solver for this, so we just add the erase
However, I'm not sure if this is a good idea. Perhaps it should only be
done for pruned packages, and not explicitly uninstalled ones. I did try
various things to strengthen the requirement on 'base', but had no luck.
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple