fn extract_pkg_files(
pkg: &DirEntry,
target_dir: &Path,
repo_name: &str,
) -> Result<()>
Expand description
Use tar
to extract relevant package metadata and script files from packages files.
This function attempts to extract “.MTREE”, “.BUILDINFO”, “.PKGINFO” and “.INSTALL” files. Extracted files are placed in a directory structure that reflects the package’s association with a package repository.
§Note
Since some files are optional, we have to take a look at the files in that tarball to determine which of the files need to be actually extracted.