summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/alpm.h
AgeCommit message (Collapse)AuthorFilesLines
2011-06-15API: change 'signaturedir' to 'gpgdir'Dan McGee1-4/+4
This is more in line with reality and what we have our makepkg, etc. options named anyway. Original-patch-by: Kerrick Staley <mail@kerrickstaley.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14Remove alpm_db_get_url()Dan McGee1-6/+0
This method is old, it doesn't adequately check for a NULL server list, and can easily be done using better API method we provide these days. All former users of this method can get similar results by calling alpm_db_get_servers() and using the data from the returned server list. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14Move pm_errno onto the handleDan McGee1-7/+3
This involves some serious changes and a very messy diff, unfortunately. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14Add handle argument to two more alpm methodsDan McGee1-3/+4
This takes care of alpm_checkdeps() and alpm_find_dbs_satisfier(). Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14Require handle for alpm_checkconflicts()Dan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14Require handle for alpm_pkg_load()Dan McGee1-2/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14Add handle argument to alpm_(add|remove)_pkg()Dan McGee1-2/+4
This makes these functions consistent with the rest of the transaction related API calls. We do an additional assert to ensure the handle attached to the package is the same as the handle passed in. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-09Require handle for alpm_sync_sysupgrade()Dan McGee1-1/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-09Require handle for alpm_db_register_sync()Dan McGee1-1/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-09Require handle argument to all alpm_trans_*() methodsDan McGee1-9/+17
Begin enforcing the need to pass a handle. This allows us to remove one more extern handle declaration from the backend. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-09Require handle argument to all alpm_option_(get|set)_*() methodsDan McGee1-48/+49
This requires a lot of line changes, but not many functional changes as more often than not our handle variable is already available in some fashion. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-09Require handle argument to alpm_logaction()Dan McGee1-1/+1
This is the first in a series of patches to update the API to remove the implicit global handle variable. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-07New signatures for alpm initialize and releaseDan McGee1-24/+12
These new method signatures return and take handle objects to operate on so we can move away from the idea of one global handle in the API. There is also another important change and that deals with the setting of root and dbpaths. These are now done at initialization time instead of using setter methods. This allows the library to operate more safely knowing that paths won't change underneath it. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-03Add handle attribute to pmdb_t structDan McGee1-0/+1
This is the first step in a long process to remove our dependence on the global handle variable we currently share in libalpm, with the goal to make things a bit more thread-safe and re-entrant. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-05Improve database server APIDan McGee1-7/+8
Currently we have one call that has all sorts of crazy behavior and doesn't make a whole lot of sense. Go from one method to the normal four methods we have for all of our other lists we use in the library to make it a lot easier for a frontend to manipulate server lists. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-24Perform package verification at package load timeDan McGee1-2/+5
Both md5sum verification and PGP verification can and should be done at package load time. This allows verification to happen as early as possible for packages provided by filename and loaded in the frontend, and moves more stuff out of sync_commit that doesn't really belong there. This should also set the stage for simplified parallel loading of packages later down the road. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-24Rein in the complexity of the signature typeDan McGee1-3/+0
Given that we offer no transparency into the pmpgpsig_t type, we don't really need to expose it outside of the library, and at this point, we don't need it at all. Don't decode anything except when checking signatures. For packages/files not from a sync database, we now just read the signature file directly anyway. Also push the decoding logic down further into the check method so we don't need this hanging out in a less than ideal place. This will make it easier to conditionally compile things down the road. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-23Make dump_pkg_full a little less insaneDan McGee1-2/+2
The various "level" values were a bit crazy to decipher, and we were doing some very interesting comparisons in certain places. Break it out into two parameters instead so we can seperate the type from the extra information display, and do things accordingly. Nothing changes with the display of any of the five types we currently show: -Si, -Sii, -Qi, -Qii, -Qip. Something to note- we should expose the PKG_FROM enum type somehow, this patch leaves the door open to do that quite easily. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-21alpm.h: add several missing documentation stringsRémy Oudompheng1-0/+13
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
2011-04-21alpm.h: rationalize option getters/setters documentationRémy Oudompheng1-17/+49
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
2011-04-21alpm.h: add/improve function documentationRémy Oudompheng1-5/+25
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
2011-04-21Allow VerifySig to act as a default verification in [options]Dave Reisner1-0/+3
* add _alpm_db_get_sigverify_level * add alpm_option_{get,set}_default_sigverify And set the default verification level to OPTIONAL if not set otherwise. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-21alpm.h: forward-declare shared enumerationsDan McGee1-19/+30
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-16Merge branch 'maint'Dan McGee1-40/+447
Conflicts: lib/libalpm/alpm.h lib/libalpm/trans.c Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-16libalpm: consistently use int as return type for option settersRémy Oudompheng1-17/+17
Currently the only error case then when handle == NULL. However several handle functions return -1 on this error, and a uniform API makes things simpler. Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
2011-04-13alpm.h: fix typos in documentationRémy Oudompheng1-1/+1
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
2011-04-09alpm.h: document transaction flagsRémy Oudompheng1-0/+16
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
2011-04-09More documentation for option getters/setters.Rémy Oudompheng1-2/+27
2011-04-09alpm.h: more documentation for pkgreason, depend and errno.Rémy Oudompheng1-5/+39
2011-04-09Move documentation for public package function to alpm.hRémy Oudompheng1-4/+66
2011-04-09alpm.h: organize doxygen documentation in groupsRémy Oudompheng1-14/+39
2011-04-09Move documentation of public database functions to alpm.hRémy Oudompheng1-5/+79
2011-04-09alpm.h: add documentation for package property accessorsRémy Oudompheng1-0/+136
2011-04-09Move documentation of public transaction functions to alpm.hRémy Oudompheng1-16/+49
2011-03-24Add functions for verifying database signatureAllan McRae1-0/+1
Add a pmpgpsig_t struct to the database entry struct and functions for the lazy loading of database signatures. Add a function for checking database signatures, reusing (and generalizing) the code currently used for checking package signatures. TODO: The code for reading in signature files from the filesystem is duplicated for local packages and database and needs refactoring. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-03-23Added gpg verification options per repo to the config file.Xavier Chantry1-0/+9
Once we do this, add support for VerifySig to pactest. We just check if the repo name contains Always, Never or Optional to determine the value of VerifySig. The default is Never. pacman uses Always by default but this is not suitable for pactest. Original-work-by: shankar <jatheendra@gmail.com> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23Integrate GPGME into libalpmDan McGee1-1/+9
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23Add some error codes for signature verificationDan McGee1-0/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23Add signature directory as option on libalpm handleDan McGee1-0/+3
This will serve as the home directory we pass to GPGME when making calls so we can have a libalpm-utilized keyring. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23Merge branch 'gpg-libalpm-basics'Dan McGee1-0/+2
2011-03-23Remove libfetch error codeDan McGee1-1/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23Allow PGP signature to be read from sync databaseDan McGee1-0/+2
Add a new field to the package struct to hold PGP information and instruct db_read to pick it up from the database. It is currently unused internally but this is the first step. Due to the fact that we store the PGP sig as binary data, we need to store both the data and the length so we have a small utility struct to assist us. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2011-03-09handle error case for PM_ERR_LIBCURLDave Reisner1-0/+1
Add PM_ERR_LIBCURL to error enum and handle case in error.c by returning curl_easy_strerror() based on the error number carried by the gloabl alpm handle. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-02-28Check local DB version before continuing transactionDan McGee1-0/+1
Ensure we have a local DB version that is up to par with what we expect before we go down any road that might modify it. This should prevent stupid mistakes with the 3.5.X upgrade and people not running pacman-db-upgrade after the transaction as they will need to. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-25alpm: alpm_db_get_pkgcache_list => alpm_db_get_pkgcacheDave Reisner1-1/+1
This avoids needless breakage of the public API. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-25alpm: remove public visibility of pmpkghash_tDave Reisner1-2/+0
There's no API functions exposed which allow manipulation of this type, so remove it from public view. Also, rename the public and private alpm_db_get_pkgcache symbol to alpm_db_get_pkgcache_has. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-24Mark log callback format string constDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-04Read pkgcache into hashAllan McRae1-1/+2
Read the package information for sync/local databases into a pmpkghash_t structure. Provide a alpm_db_get_pkgcache_list() method that returns the list from the hash object. Most usages of alpm_db_get_pkgcache are converted to this at this stage for ease of implementation. Review whether these are better accessing the hash table directly at a later stage. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-02-04Add a hash table for holding packagesAllan McRae1-0/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-01-31alpm/depcmp: new NODEPVERSION flagXavier Chantry1-1/+1
This flag allows to disable version checking in dependency resolving code. depcmp_tolerant respects the NODEPVERSION flag but we still keep the original strict depcmp. The idea is to reduce the impact of the NODEPVERSION flag by using it in fewer places. I replaced almost all depcmp calls by depcmp_tolerant in deps.c (except in the public find_satisfier used by deptest / pacman -T), but I kept depcmp in sync.c and conflict.c Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>