This library was developed to deal with hotfixing products that are
distributed as a Prolog saved state. It assumes the vendor is willing to
distribute hotfixes as Prolog source files. These files are placed into
a directory. The predicate load_hotfixes/1 replaces files that are
loaded into the saved state.
Resolution of the file to load is based on the module if the hotfix file
provides a module. If the hotfix file is not a module file and there are
multiple loaded source files with the same name from different
directories, the hotfix directory must create the minimal directory
structure to make the paths unique. If omitted, this library will prompt
the user for the file that must be replaced.
- - Jan Wielemaker
- To be done
- - This could be extended in several ways:
- Load hotfixes from a (encrypted) zip file
- Use digital signatures and load over HTTP
- Replace individual predicates
- load_hotfixes(+Dir) is det
- Load all hotfixes that have not yet been applied into the
- prolog_source_files(+Dirs)// is det[private]
- Find all Prolog source files in the given directory.
- apply_hotfix(+HotfixDir, +File) is det[private]
- Locate the hotfix and load it if it is newer. First step to find
the file we must replace is using the module name, as these are
guaranteed to be unique in the Prolog process. If that fails, we
use the filename, but now we can get multiple files with the
same name loaded from different directories as candidates.
Finally, if no file matches, we load the file into the
- ensure_dirsep(+Dir, -DirSlash) is det[private]
- load_hotfix(+HotfixFile, +Loaded) is det[private]
- Reload the HotfixFile, pretending we are reloading Loaded.
- See also
- - make:reload_file/1
- select_file_to_reload(+Pairs, +Local, -Pair) is det[private]
- file_module(+File, -Module) is semidet[private]
- True if Module is the module defined in File.