Skip to content

Commit a4b9099

Browse files
authored
Extensive loadup scripts revamp (#2111)
This PR is an extensive revamp of the loadup scripts including the following changes: New omnibus script scripts/loadup which is meant to be the single interface to the loadup system. The man page for this script can be found here: https://online.interlisp.org/downloads/man_loadup.html The new loadup script allows you to restart the loadup process from any particular stage - init, mid, lisp, full, etc. For example, you can start the loadup from an existing init-mid.sysout and have it run thru creating the full.sysout. The call for this would be: ./scripts/loadup --target full --start mid. (See man page for all options to the loadup script as well as examples of their use.) In order to facilitate this target/start feature, the loadup workdir has been moved to a single location per MEDLEYDIR, specifically to MEDLEDIR/loadups/build. (Previously, it was different for every invocation in /tmp/loadups-$$) When restarting the loadup from, say, lisp.sysout, the script will look for the lisp.sysout to start from first in MEDLEYDIR/loadups and then in MEDLEYDIR/loadups/build. If the starting sysout is found in loadups, it will be copied (non-versioned) into the workdir before doing the loadup, overwriting whatever is already there. There is now a lock (MEDLEYDIR/loadups/build/lock) that prevents concurrent loadups from running (and very occassionally needs to be manually removed). At successful completion of a loadup run, the created .sysouts and other files are moved into the loadups directory as before (unless the --nocopy option is specified). BUT the build files - including the dribble files - are left in the working directory (i.e., in loadups/build) The loadup script now supersedes the former loadup-all.sh, loadup-full.sh and loadup-db.sh scripts. But I have left in their place scripts that call the new loadup script with the right options. loadup-all.sh is now just a link to the single loadup script, who's options are (hopefully) a superset of loadup-all.sh. All of the worker scripts (e.g., loadup-full-from-lisp.sh) have been updated to use better mechanisms to catch and report errors, including the new (LOGOUT T EXITCODE) feature. The main script has been updated to better catch errors in these worker scripts when they do happen. You can now specify a MAIKODIR for the loadup, either using the MAIKODIR env variable or thru the --maikodir command line option. All of the loadup scripts have been moved down one level into scripts/loadups. But there are links from the scripts/ directory into the scripts/loadups directory for all of the top-level legacy scripts - loadup-all.sh, loadup-db.sh, loadup-full.sh so that you do not have to change your own scripts unless you need to use some of the new features. More importantly, none of the github workflows need to change right now. The SYSOUTCOMMITS mechanism had to be changed since there is no guarantee that e.g., lisp.sysout and full.sysout are built on the same commit. So (ASSOC 'MEDLEY SYSOUTCOMMITS) now returns an assoc list of sysouts, e.g., ((INIT "aaa")(LISP "bbb")(FULL "ccc")(APPS "ddd")), showing the commits for the various layers of the loadup. The new loadup scheme allows different sysouts to be created from different commits, so there is an issue with RDSYS (and RDSYS.LCOM) being out of sync with one or more of the sysout in loadups. RDSYS(.LCOM) are copied into library when ever a loadup of the Init stage completes successfully (unless the -nocopy option is specified). The only way to solve this issue when it arises is to do a complete loadup from starter.sysout to full.sysout (or apps.sysout) to ensure evrything is built on the same commit.
1 parent f4b7e91 commit a4b9099

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2420
-719
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ loadups/*.dribble
3030
loadups/whereis.hash
3131
loadups/apps.sysout
3232
loadups/fuller.database
33+
loadups/build/
3334

3435
# manual cross-reference files
3536

internal/loadups/LOADUP-APPS

Lines changed: 61 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,86 @@
11
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
22

3-
(FILECREATED "17-Jan-2023 20:34:02" {DSK}<home>frank>il>medley>gmedley>sources>LOADUP-APPS.;3 2095
3+
(FILECREATED " 9-Mar-2025 20:03:27" {DSK}<home>frank>il>medley>internal>loadups>LOADUP-APPS.;10 3274
44

5-
:CHANGES-TO (FNS Apps.RemoveBackgroundMenuItem)
5+
:EDIT-BY "frank"
66

7-
:PREVIOUS-DATE "17-Jan-2023 20:29:39" {DSK}<home>frank>il>medley>gmedley>sources>LOADUP-APPS.;2
7+
:CHANGES-TO (FNS LOADUP-APPS)
8+
9+
:PREVIOUS-DATE " 9-Mar-2025 19:42:36" {DSK}<home>frank>il>medley>internal>loadups>LOADUP-APPS.;8
810
)
911

1012

1113
(PRETTYCOMPRINT LOADUP-APPSCOMS)
1214

1315
(RPAQQ LOADUP-APPSCOMS ((GLOBALVARS *ALL-BUTTONS* BackgroundMenuCommands BackgroundMenu)
14-
(FNS Apps.LOADUP Apps.RemoveBackgroundMenuItem)))
16+
(FNS LOADUP-APPS Apps.RemoveBackgroundMenuItem)))
1517
(DECLARE%: DOEVAL@COMPILE DONTCOPY
1618

1719
(GLOBALVARS *ALL-BUTTONS* BackgroundMenuCommands BackgroundMenu)
1820
)
1921
(DEFINEQ
2022

21-
(Apps.LOADUP
22-
[LAMBDA NIL (* ; "Edited 12-Nov-2022 14:03 by FGH")
23-
(PROGN
24-
(* ;; " Delete button(s) that are created when lispusers/BUTTONS is loaded")
23+
(LOADUP-APPS
24+
[LAMBDA NIL (* ; "Edited 9-Mar-2025 20:02 by frank")
25+
(* ; "Edited 2-Jan-2025 20:38 by lmm")
26+
(* ; "Edited 2-Jan-2025 06:30 by larry")
27+
28+
(* ;; "= = = = = = = = = = = = = = = = = =")
29+
30+
(* ;; " Load ROOMS")
31+
32+
(* ;; "")
33+
34+
(DOFILESLOAD `((SYSLOAD SOURCE)
35+
(FROM ,(MEDLEYDIR "ROOMS"))
36+
ROOMS))
37+
38+
(* ;; "======================")
39+
40+
(* ;; " Load Notecards and %"fix up%"")
41+
42+
(* ;; "")
43+
44+
(DOFILESLOAD `((SYSLOAD)
45+
(FROM ,(CONCAT (UNIX-GETENV "NOTECARDSDIR")
46+
"/system"))
47+
NOTECARDS))
48+
(Apps.RemoveBackgroundMenuItem 'NoteCards) (* ; "")
49+
(PUTASSOC 'NOTECARDS (LIST (UNIX-GETENV 'NOTECARDS_COMMIT_ID))
50+
SYSOUTCOMMITS)
51+
52+
(* ;; "======================")
53+
54+
(* ;; " Load CLOS and %"fix up%"")
55+
56+
(* ;; " Assumes that clos/DEFSYS.DFASL has already been loaded (so CLOS: package is defined)")
57+
58+
(* ;; "")
59+
60+
(LOADUP-CLOS)
61+
(CLOS::LOAD-CLOS) (* ; "")
62+
(Apps.RemoveBackgroundMenuItem 'BrowseClass)
63+
64+
(* ;; "= = = = = = = = = = = = = == = = = ")
2565

26-
(for B in *ALL-BUTTONS* do (DELETE-BUTTON B))
66+
(* ;; " Load lispusers/BUTTONS and %"fix up%"")
2767

28-
(* ;; " Remove the BUTTONS BackgroundMenu item")
68+
(* ;; "")
2969

30-
(Apps.RemoveBackgroundMenuItem "Button Control")
70+
(DOFILESLOAD '((SYSLOAD)
71+
BUTTONS))
72+
(Apps.RemoveBackgroundMenuItem "Button Control")
73+
(for B in *ALL-BUTTONS* do (DELETE-BUTTON B))
3174

32-
(* ;; " Remove the NoteCards Background Menu Item")
75+
(* ;; "= = = = = = = = = = = = = == = = = ")
3376

34-
(Apps.RemoveBackgroundMenuItem 'NoteCards)
77+
(* ;; " Do misc")
3578

36-
(* ;; " Remove the CLOS Background Menu Item")
79+
(* ;; "")
3780

38-
(Apps.RemoveBackgroundMenuItem 'BrowseClass)
39-
(RPLACA [CAR (LIST '(A B C]
40-
NIL])
81+
(PUTASSOC 'MEDLEY (LIST (UNIX-GETENV 'LOADUP_COMMIT_ID))
82+
SYSOUTCOMMITS)
83+
(PRINTOUT T "commits-- " SYSOUTCOMMITS T])
4184

4285
(Apps.RemoveBackgroundMenuItem
4386
[LAMBDA (ItemStringOrAtom)
@@ -52,5 +95,5 @@
5295
Apps.SBG])
5396
)
5497
(DECLARE%: DONTCOPY
55-
(FILEMAP (NIL (647 2072 (Apps.LOADUP 657 . 1400) (Apps.RemoveBackgroundMenuItem 1402 . 2070)))))
98+
(FILEMAP (NIL (656 3251 (LOADUP-APPS 666 . 2579) (Apps.RemoveBackgroundMenuItem 2581 . 3249)))))
5699
STOP

internal/loadups/LOADUP-APPS.LCOM

660 Bytes
Binary file not shown.

internal/loadups/LOADUP-CLOS

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
2+
3+
(FILECREATED " 9-Mar-2025 19:04:34" {DSK}<home>frank>il>medley>internal>loadups>LOADUP-CLOS.;1 600
4+
5+
:EDIT-BY "frank"
6+
7+
:CHANGES-TO (VARS LOADUP-CLOSCOMS))
8+
9+
10+
(PRETTYCOMPRINT LOADUP-CLOSCOMS)
11+
12+
(RPAQQ LOADUP-CLOSCOMS ((FNS LOADUP-CLOS)))
13+
(DEFINEQ
14+
15+
(LOADUP-CLOS
16+
[LAMBDA NIL (* ; "Edited 9-Mar-2025 18:53 by frank")
17+
(DOFILESLOAD `((SYSLOAD)
18+
(FROM ,(MEDLEYDIR "CLOS"))
19+
DEFSYS])
20+
)
21+
(DECLARE%: DONTCOPY
22+
(FILEMAP (NIL (333 577 (LOADUP-CLOS 343 . 575)))))
23+
STOP

internal/loadups/LOADUP-CLOS.LCOM

648 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)