User:Toofishes/Libalpm and LUA

From ArchWiki

This is a brief outline mainly for my own use in getting a hooks and other scripting point backend written for libalpm.


These things can become objects with the listed methods attached.


  • Any alpm_option_* method
  • Any alpm_trans_* method (since we only have one transaction per handle)
  • alpm_fetch_pkgurl (although probably not needed in backend...)
  • alpm_get_localdb
  • alpm_get_syncdbs
  • alpm_register_syncdb
  • alpm_unregister_all_syncdbs
  • alpm_pkg_load
  • alpm_find_group_pkgs
  • alpm_sync_sysupgrade
  • alpm_add_pkg
  • alpm_remove_pkg
  • alpm_checkdeps
  • alpm_find_satisfier (TODO: why doesn't this take handle)
  • alpm_find_dbs_satisfier
  • alpm_checkconflicts
  • alpm_errno (and add convenience function for strerror)
  • alpm_release


  • Any alpm_pkg_get_* method
  • Any other alpm_pkg_* methods?
  • alpm_pkg_check_pgp_signature
  • alpm_pkg_changelog_read (TODO: change so pkg is first argument)
  • alpm_sync_newversion


  • Any alpm_db_* method
  • alpm_db_check_pgp_signature
  • alpm_db_update (TODO: change so db is first parameter)

Top-level Methods

  • alpm_version
  • alpm_capabilities
  • alpm_pkg_vercmp (TODO: change this name, why does it have pkg in it)
  • alpm_initialize
  • alpm_compute_md5sum
  • alpm_compute_sha256sum
  • alpm_strerror

These are attached to nothing except the top-level alpm library object.