tablet layout version 0: layout 0 is anything unversioned with all its problems, if a tablet like this is seen it should be updated to version 1, the defects that exist are enumerated below, future tablet versions will not require this as they will be more fully documented and formal accessor functions will deal with interfacing with them tablet layout version 1: $TABLET_PATH/$SPELL// build_api depends grimoire_name grimoire/ logs/[install,md5sum,compile] (links to real files) roots (all important FOO_ROOT values) section/ section_name sources (the sources and urls used) spell/ spell_config spell_config.p status (installed or held) tb_version (tablet version) updated (value of $UPDATED) patchlevel (value of $PATCHLEVEL) (optional, defaults to 0) security_patch (value of $SECURITY_PATCH) (optional, defaults to 0, name still undecided upon) updated (value of $UPDATED) version (value of $VERSION) cache symlink to cache archive known defects pre tablet version 1 (and the functions that fix them) : no version file : tablet_0_repair_version no updated file : tablet_0_repair_updated spell/ / , should be spell/ tablet_0_repair_spell DONE no tb_version : tablet_0_repair (bumps to version 1) Terminology: "the tablet" the directory $TABLET_PATH and everything in it "tablet chapter" A spell's directory within the tablet eg: $TABLET_PATH/$SPELL/... "tablet page" A specific instance of a spell in a chapter eg: $TABLET_PATH/$SPELL/ /... this is sometimes called a tablet dir, but I'm trying to phase that out Accessors Routines (thus far): tablet_get_spell_file tablet_get_section_file tablet_get_grimoire_file tablet_get_build_api tablet_get_version tablet_get_updated tablet_get_patchlevel tablet_get_security_patch tablet_get_depends tablet_get_sub_depends tablet_get_rsub_depends tablet_get_status tablet_get_sources tablet_get_spell_filter tablet_get_section_filter tablet_get_grimoire_filter tablet_load_roots tablet_unload_roots tablet_get_tb_version tablet_get_spell_name_from_path Cleanse routines: tablet_cleanse_tablet : Fix the whole tablet tablet_cleanse_chapter : Fix a chapter tablet_coalesce_files : hardlink identical files to save space tablet_fix_duplicates determine if a tablet points back at itself through the install log
(C) 2004 The Source Mage Team
Functions for dealing with tablet
return section name from tablet
get path to roots
spell name
determine the spell associated with a tablet path
tablet paths are $TABLET_PATH/
path to unique tablet directory
setup a unique tablet directory
TABLET_IGNORE if set means that there isnt a tablet for this
and somewhere up the stack knows this
TABLET_SPELL_DIR if set, is the value of the tablet for this
spell, because somewhere up the stack it was just created (so dont bother
looking for it)
the idea for the two globals is to simplify the layers in-between and skip searching when it isn't necessary
quicker dirtier version of above without special checks since the tablet in a cache tarball has nothing to do with the installed system
everything that comes with a spell...
this is to set a spell based on whats in the installed grimoire possibly for re-casting, not sure what else... Note that this function does not use the tablet_get accessors for efficiency.
Import repair files for all tablet pages
Import repair files for a specific tablet page, expects caller to have spell_lookup_hash setup for a spell lookup, and nullglob set.
Private subroutine for tablet_import_repair_files_page, do not call from anywhere else.
Creates a version cache like the one of scribe reindex-version, but from the data found in the tablet
Checks for existance and on failure creates the tablet version cache
check if the tablet represents a spell version thats installed
check if a tablets install log includes itself
$TABLET_PATH
none
Intended to be used by cleanse, this routine finds identical files in $TABLET_PATH and hardlinks identical files together in order to save space. This is done on the assumption that 1) tablet files are treated as read only, and 2) anyone using the tablet for write operations (they shouldnt be) will break the hardlinks
Fix the various known defects with an un-versioned tablet and stuff a version of 1 in it.
tablet may have either
$tb_dir/spell/DETAILS or
$tb_dir/spell/
Repair the "updated" file as it wasnt created for all pre-versioned tablets. Source the spell, echo $VERSION into a file named version
Repair the "updated" file as it wasnt created for all pre-versioned tablets. Source the spell, echo $UPDATED into a file named updated