writeMD5LM: Write the MD5 integrity manifest for an installed package

View source: R/writeMD5LM.R

writeMD5LMR Documentation

Write the MD5 integrity manifest for an installed package

Description

Write the standard R ‘MD5’ manifest into an installed package directory so that checkMD5sums (and IQLM) can verify file integrity. The manifest records the md5 checksum of every installed file. It is the same ‘MD5’ file that CRAN ships and that R's own installer writes; packages installed from CRAN already contain it, but a local source install usually does not (which is why the IQ integrity check then reports WARN). Run writeMD5LM() once, immediately after installing the package, to record the trusted baseline; thereafter checkMD5sums() detects any later modification of the installed files.

Usage

writeMD5LM(pkg = "sasLM", lib.loc = NULL)

Arguments

pkg

name of the installed package whose ‘MD5’ manifest should be written.

lib.loc

character vector of library paths to search for pkg, passed to find.package. NULL uses the default libraries.

Details

The manifest is written in the format used by checkMD5sums: one line per file, <md5sum> *<relative-path>. The ‘MD5’ file itself is excluded. The function uses only the exported md5sum. The installed package directory must be writable.

Value

Invisibly, the path to the ‘MD5’ file that was written. Called for its side effect.

Author(s)

Kyun-Seop Bae <k@acr.kr>

See Also

IQLM, checkMD5sums, md5sum

Examples

#writeMD5LM("sasLM")
#sasLM::IQLM()       # the file-integrity check now reports PASS

sasLM documentation built on July 14, 2026, 5:06 p.m.