sagemath/sage

Switching from --without-system-SPKG to --with-system-SPKG does not trigger rebuilds of dependent packages

mkoeppe opened this issue · 2 comments

As observed, for example, in #31267:
Build SPKG readline, build SPKG singular (which has the dependency on readline); then removing the SPKG readline and using the system readline does not trigger a rebuild of singular.

This is caused by a shortcoming of our build system: All system packages are represented by the target $SAGE_LOCAL/var/lib/sage/installed/.dummy - which is old.

As a solution, we replace use of .dummy by separate files that represent system packages in
$SAGE_LOCAL/var/lib/sage/system/....

These files can just be empty regular files, but in some cases, they could be symlinks to system files, so that an update of a system package triggers the rebuild of a Sage package.

sage.misc.package would be extended to also read these installation records.

CC: @dimpase @jhpalmieri @orlitzky

Component: build

Issue created by migration from https://trac.sagemath.org/ticket/31277

comment:1

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

Description changed:

--- 
+++ 
@@ -3,5 +3,10 @@
 
 This is caused by a shortcoming of our build system: All system packages are represented by the target `$SAGE_LOCAL/var/lib/sage/installed/.dummy` - which is old.
 
+As a solution, we replace use of `.dummy` by separate files that represent system packages in 
+`$SAGE_LOCAL/var/lib/sage/system/...`.
 
+These files can just be empty regular files, but in some cases, they could be symlinks to system files, so that an update of a system package triggers the rebuild of a Sage package.
 
+`sage.misc.package` would be extended to also read these installation records.
+