summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/db.h
AgeCommit message (Collapse)AuthorFilesLines
2007-08-16libalpm/db.c : add alpm_db_unregister_all.Chantry Xavier1-0/+1
This basically moves the code from alpm_release, which was mostly about unregistering all databases, to a safer alpm_db_unregister_all. This allows to avoid modifying the dbs_sync list while iterating over it, and and also prevent alpm_release from looping infinitely when a database can't be unregistered. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-06-09Add a alpm_db_test() function to the backend for checking DB consistencyVMiklos1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-05Const correctness!Dan McGee1-3/+3
Add some 'const' keywords all over the code to make it a bit more strict on what you can and can't do with data. This is especially important when we return pointers to the pacman frontend- ideally this would always be untouchable data. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-04Rip alpm_parse_config out of libalpmDan McGee1-1/+1
Switch over to the new frontend parseconfig. * Fix a few issues in parseconfig * Remove unused callback upon database registration * Remove conf file related errors from error.c/alpm.h Signed-off-by: Dan McGee <dan@archlinux.org>
2007-05-31Move DB and cache dirs away from there dependence on ROOTDIRDan McGee1-1/+1
This change allows us to use all autoconf specified paths, most notably $(localstatedir). It is quite a change and touches a lot of files, as all references to the DB and cache were done with the ROOTDIR as a prefix. * add --lock command-line option to pacman to specify the location of the lockfile (this can now be specified at configure time by setting the $localstatedir path). * Rip quite a few settings out of configure.ac as they are now picked by setting the paths during configure or make. * Fix bug with /tmp fallback for sync downloads not working correctly (related to root location, now the system tmp dir is used). * Simplified the parameters to some libalpm functions, and added get/set for the new lockfile option. * Renamed several of the DEFS to names without the PM_ prefix. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-03-12* Removed ${CFLAGS} from Makefile.am(s) as it was causing all CFLAGS to beDan McGee1-1/+2
duplicated. * Updated the util Makefile.am to link with the proper libalpm.la. * Fixed bitmasking issues in be_files.c and db.h. * Rankmirrors updates from James Rosten (with some cleaning up of my own). KeyboardInterrupts are now handled gracefully.
2007-03-03Big commit this time:Aaron Griffin1-1/+1
* Moved entirely to alpm_pkg_get_* accessors, to read data on demand * Mostly removed the INFRQ_ parameters from outside the be_files backend (making the backend more extensible in the long run) * packages created from _alpm_db_scan now have the db and origin set (making accessors actually work for these packages) * removed _alpm_db_ensure_pkgcache * totally revamped the _alpm_checkconflicts function, making it cleaner and easier to read (and thus fix in the long run) - maintainable code ftw NOTE: feel free to rename the functions... I couldn't think of anything better * removed an extra loop in sync.c:find_replacements - no sense in looping over an entire DB while strcmp'ing the name, when we have get_pkgfromcache Other: * package struct "license" -> "licenses" * Created _alpm_sync_find (duplicate code in some places, find_pkginsync * Minor const correctness changes along the way * fixed a couple extra '/' pathing issues (non-issues really) * removed a duplicate pkg_cmp function
2007-03-01* Oops- I need to learn to count in hex.Dan McGee1-1/+1
2007-03-01* Modified values of INFRQ_* options so we start at 0x01 and not 0x00. ThisDan McGee1-5/+5
allows for the same bit operators to be used across the board on pkg_get operations. * Changed name of INFRQ_NONE -> INFRQ_BASE to more clearly reflect what it does (loads pkg name and version). * Added a few missing things on package functions, such as SYMEXPORT and ALPM_LOG_FUNC. * Slight updates to pmenv to print 'pass' and 'fail' instead of 'passed' and 'failed'. Keeps output a bit more concise. * Fixed a doxygen comment spelling error. :P
2007-03-01* Fix up _alpm_db_free, remove use of void*.Dan McGee1-1/+1
2007-02-26* Enforce const char* params when using stringsAaron Griffin1-3/+3
* Unified some functions names "package" -> "pkg" for consistency * Removed the goofy 'faketarget' stuff used for dep testing * Renamed alpm_pkg_isin -> alpm_pkg_find * Renamed alpm_db_readpkg -> alpm_db_get_pkg
2007-02-21* Fixed inconsistency of args- _alpm_db_read, _alpm_db_write.Dan McGee1-1/+1
2007-01-31slight line spacing/indent updatesDan McGee1-0/+1
2007-01-24This mainly deals with code clarity- removing currently unneededAaron Griffin1-9/+11
optimizations in order to make the code much more readable and type-checkable. Every enum in the library now has it's own type that should be used instead of the generic 'unsigned char'. In addition, several #define statements dealing with constants were converted to enums. Signed-off-by: Dan McGee <dpmcgee@gmail.com>
2007-01-19Preliminary checkin for alpm_list conversionAaron Griffin1-4/+4
* renamed pmlist_t -> alpm_list_t * made alpm_list_t a public type (alpm_list.h header) * removed additional storage for registered DBs in pacman source * some code cleanup * removed duplicate (pm)list_display functions from pacman source * misc code cleanup
2006-12-22Cleanup from Dan McGee <dpmcgee@gmail.com> and Jürgen Hötzel ↵Aaron Griffin1-2/+4
<juergen@hoetzel.info> * configure swig check * misc libalpm cleanup
2006-11-20* repo-add script - to add entries to a db file directly from package data ↵Aaron Griffin1-14/+9
(no PKGBUILD) * libalpm api changes - move from a _getinfo(p, WHAT_WE_WANT) scheme to a typesafe _get_what_we_want(p) scheme [not 100% complete yet] * some const correctness changes * removal of PM_* types in alpm.h in favor of the pm*_t types used throughout libalpm
2006-10-25Moved downloaded db unpacking to the backend files, to easier allow conversionAaron Griffin1-0/+2
from db to whatever format we need.
2006-10-20A handful of minor changes:Aaron Griffin1-4/+6
* Removed the PMList typedef, in favor of the same naming scheme other structs use 'pmlist_t' * Added a time stamp on debug output, to make it more informational * Moved alpm_db_register to _alpm_db_register, making the public function not take a callback parameter
2006-10-15Merged frugalware changes (too many to list). Also added some config fileAaron Griffin1-4/+9
handling changes (support [sections] to carry over to included files - this helps with backwards compatibility with existing pacman config files)
2006-03-08all _alpm_XXX_cmp functions are now publicAurelien Foret1-0/+1
2006-03-07code cleanupAurelien Foret1-1/+0
2006-03-02reworked the db object to prepare future integration with different backendsAurelien Foret1-7/+8
2006-02-22improved _alpm_list_free handlingAurelien Foret1-1/+1
2006-02-17prepend library function names with _alpm (helped with the patch from ↵Aurelien Foret1-7/+7
VMiklos <vmiklos@frugalware.org>) added log and event callbacks to sync_commit internal transactions
2006-02-16- db_write: add support to write both local and sync entriesAurelien Foret1-2/+1
- code cleanup
2006-02-15- merged db_open and db_create into one single functionAurelien Foret1-7/+3
- moved the .lastupdate support to the frontend
2006-01-02patch from VMiklos - use PACKAGE_VERSION instead of PACMAN_VERSIONJudd Vinet1-1/+1
2005-04-02- added 'lastupdate' field to pmdb_tAurelien Foret1-0/+2
- added a new public function alpm_db_getinfo - added a public parameter PM_PKG_DB for PM_PKG struct
2005-03-23- removed db_find_conflicts() declaration from db.hAurelien Foret1-2/+0
- included conflict.h from add.c
2005-03-22- added db_setlastupdate to db.cAurelien Foret1-2/+2
- moved db_update from db.c to alpm.c
2005-03-20Added support for .lastupdate files (from pacman 2.9.1)Aurelien Foret1-1/+3
2005-03-16Added DB_TREENAME_LEN define to avoid hardcoded length for database stringAurelien Foret1-1/+3
2005-03-16Fixed a typoAurelien Foret1-1/+1
2005-03-16Added a db_update() function to manage sync databases updates.Aurelien Foret1-0/+1
The API provides a wrapper alpm_db_update().
2005-03-15Initial revisionJudd Vinet1-0/+60