MCPcopy Create free account
hub / github.com/archlinux/alpm / read_install_scriptlet

Method read_install_scriptlet

alpm-package/src/package.rs:896–904  ·  view source on GitHub ↗

Reads the content of the [alpm-install-scriptlet] from the package archive, if it exists. # Errors Returns an error if [`PackageReader::entries`] fails to read the entries. [alpm-install-scriplet]: https://alpm.archlinux.page/specifications/alpm-install-scriptlet.5.html

(&mut self)

Source from the content-addressed store, hash-verified

894 ///
895 /// [alpm-install-scriplet]: https://alpm.archlinux.page/specifications/alpm-install-scriptlet.5.html
896 pub fn read_install_scriptlet(&mut self) -> Result<Option<String>, crate::Error> {
897 for entry in self.entries()? {
898 let entry = entry?;
899 if let PackageEntry::InstallScriptlet(scriptlet) = entry {
900 return Ok(Some(scriptlet));
901 }
902 }
903 Ok(None)
904 }
905
906 /// Reads a [`TarballEntry`] matching a specific path name from the package archive.
907 ///

Callers 1

read_package_contentsFunction · 0.80

Calls 1

entriesMethod · 0.45

Tested by 1

read_package_contentsFunction · 0.64