You are not logged in.

#1 2020-07-09 03:28:32

Toad39
Member
Registered: 2020-07-06
Posts: 14

[Solved] Libalpm as a Library

Hello,

I am looking to build a ports-like tree for the Arch Build System. Currently, I am using shell commands to achieve this. However, the lib in libalpm makes me think that it can be used in another way, perhaps as a C header or something to manage packages better. Is this possible, or is libalpm not something that can be used like another library (eg. cstl)?

Thank you for your consideration.

Last edited by Toad39 (2020-07-10 18:05:47)

Offline

#2 2020-07-09 04:36:54

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 3,537

Re: [Solved] Libalpm as a Library

libalpm is the shared library providing functionality to open binary package repositories, download files, add or remove packages to the local package database, introspect data about packages from the local database, remote repos, or filesystem files, etc. I'm positive you'll find useful functionality there, which you can use.

pacman is the official libalpm client frontend, but there are others. pacutils in the official repos, a packagekit plugin, and various AUR packages including several AUR helpers and several GUIs of varying quality.

makepkg is the shell-script program which builds PKGBUILDs. makepkg depends on pacman to handle dependencies.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2020-07-10 18:04:53

Toad39
Member
Registered: 2020-07-06
Posts: 14

Re: [Solved] Libalpm as a Library

Thanks for letting me know! I found this documentation for the header. In particular, the alpm_add_pkg() and the alpm_pkg_download_size() functions seem useful.

-Toad39

Offline

#4 2020-07-10 19:31:36

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 3,537

Re: [Solved] Libalpm as a Library

That documentation is very old (Jan 9 2012). toofishes is not even active here anymore.


https://pkgbuild.com/~eschwartz/pacman-docs/ might be more useful as I've rebuilt the doxygen docs as recently as Feb 16 2020. Though lots of stuff has remained stable.

Last edited by eschwartz (2020-07-10 19:33:08)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#5 2020-07-15 02:28:31

Toad39
Member
Registered: 2020-07-06
Posts: 14

Re: [Solved] Libalpm as a Library

Oh, thanks! Sorry for not seeing this earlier, but that seemed to be helpful too.

Offline

Board footer

Powered by FluxBB