summaryrefslogtreecommitdiff
path: root/lib/libalpm/cache.c
Commit message (Collapse)AuthorAge
* Remove gettext calls from all PM_LOG_DEBUG messagesDan McGee2007-07-10
| | | | | | | There is no real reason to burden our translators with these messages, as anyone helping to debug these will probably want them in English. Signed-off-by: Dan McGee <dan@archlinux.org>
* Const correctness!Dan McGee2007-06-05
| | | | | | | | | 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>
* Remove FREELISTPTR macroDan McGee2007-04-28
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove FREEPKG macro and correctly type _alpm_pkg_freeDan McGee2007-04-28
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove FREEGRP macro and correctly type _alpm_grp_freeDan McGee2007-04-27
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Clean up gettext on the libalpm sideDan McGee2007-04-26
| | | | | | | Remove inclusion of libintl.h from all files, because we can do it once in util.c where the _() macro is defined. Signed-off-by: Dan McGee <dan@archlinux.org>
* * Fix group comparison issue and associated compilation warnings by usingDan McGee2007-03-11
| | | | | | | the alpm strcmp operation which takes void* references. * We had this great visibility patch, but never actually took advantage of it. Added the right compile flag to make it work and added some more SYMEXPORTs where necessary to have a successful compile.
* fixed string comparison callback (patch from Nagy Gabor)Jürgen Hötzel2007-03-09
|
* This commit looks much more monumental than it is. Almost all just #includeDan McGee2007-03-05
| | | | | | | | reordering and adding ones that were forgotten (noticed when trying to compile after reordering). * Updated the HACKING file to include information on #include usage. * print -> vprint in "making dir" function in pactest.
* Big commit this time:Aaron Griffin2007-03-03
| | | | | | | | | | | | | | | | | | | | | | | * 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
* * Modified values of INFRQ_* options so we start at 0x01 and not 0x00. ThisDan McGee2007-03-01
| | | | | | | | | | | | 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
* * Enforce const char* params when using stringsAaron Griffin2007-02-26
| | | | | | | * 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
* * debug cleanup (more)Aaron Griffin2007-02-22
| | | | | | | | * Fixed conflict checking. I had mistakenly assumed that the transaction packages were of type 'pmsyncpkg_t', but that is not the case. Reverted back to pmpkg_t's and fixed some checking a bit. * pactest results: PASSED = 71 (100.00%)
* * Cleaned up some debug outputAaron Griffin2007-02-22
| | | | | | | | | * Fixed a segfault in the conflict checking code * Added an automatic failure in the case of -A/-U for a replacement of an existing package. This requires a large amount of work and is postponed for now. Example: If ncmpc is installed, pacman -U /path/to/ncmpc-svn.pkg.tar.gz will fail with and appropriate error message
* * Fixed inconsistency of args- _alpm_db_read, _alpm_db_write.Dan McGee2007-02-21
|
* * Re-added a compare function for syncpkg's - it was removed without thinkingAaron Griffin2007-02-21
| | | | | | | | | | | | | | | properly * Error when re-reading the DB for replacements, wrong info level * Removed an duplicate debug message "checking for package replacements" * Check ignorepkg for REAL upgrades... * Properly check the NOSAVE flag * some unlink_file (remove.c) cleanup * fix indent level on handle.c * Force libalpm paths to end with a '/' char * Fixed 'target' looping in conflict.c (pmsyncpkg_t, not pmpkg_t) * Added some debug output to cache and db scanning ** All pactest tests succeed again, yay **
* Fix corrupt DB entry handling when loading package entries.Aaron Griffin2007-01-31
| | | | | | | | | | * scan loops no longer abort on corrupt entries * reloading a cache package (and discovering it corrupt) no longer prints 2 messages and uses the pre-build "remove from package cache" function NOTE: The TODOs in there are important for later w.r.t. cleaning up corrupt DB entries but there are some logical complexities with doing so, so I'm holding off for now.
* K. Piche <kevin.piche@cgi.com>Aaron Griffin2007-01-30
| | | | * ALPM_LOG_FUNCTION macro and all the great work to add this macro everywhere
* Discussed on IRC for a bit, this makes the following changes for clarity:Dan McGee2007-01-30
| | | | | | | | * alpm_list_is_in --> alpm_list_find * alpm_list_is_strin --> alpm_list_find_str * Flip parameters of both functions to be inline with rest of alpm_list. First commit, woohoo.
* * Shuffled some of the alpm_list free funtions - still not perfect, but betterAaron Griffin2007-01-24
| | | | | | | | | | * Added alpm_list_remove_node for single list node removal * Proper error checking/output for failed db_read/db_write (missing files) * Invalid packages (missing files) are now removed from the package cache * -Qs and -Ss output now look the same * config.rpath causes errors on one machine I had, so I added it to CVS * Fixed a "clobbered memory" issue when installing groups - only the outer list should be free'd, not the contained data
* This mainly deals with code clarity- removing currently unneededAaron Griffin2007-01-24
| | | | | | | | | | 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>
* Preliminary checkin for alpm_list conversionAaron Griffin2007-01-19
| | | | | | | | | * 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
* * Jürgen Hötzel <juergen@hoetzel.info>Aaron Griffin2007-01-11
| | | | _alpm_db_load_pkgcache: use mergesort to improve performance
* Fixed pacman -U:Aaron Griffin2006-11-01
| | | | | | * Accidental database read of a file-based package (whoops) * Proper fetching of url-based -U or -A Removed some newlines from _alpm_log calls, to make debug output more concise
* Numerous changes:Aaron Griffin2006-10-31
| | | | | | | | | | | | * Furthered the "lazy caching" to force the pkgcache to read nothing (INFRQ_NONE) by default. Anything requiring package data should now check the infolevel of each package and attempt to update it. This could be ironed out a bit more later (by using the front-end get_info function * Switched to libfetch. Drastic changes to the download code and the callback progress bar functions. Also fixed the return value of _alpm_downloadfiles_forreal. Downloading now supports http, ftp, https, and files urls, along with 'mtime's and numerous other fancy features from libfetch.
* A handful of minor changes:Aaron Griffin2006-10-20
| | | | | | | | * 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
* first stage of i18n stuff from VMiklosJudd Vinet2006-05-15
|
* all _alpm_XXX_cmp functions are now publicAurelien Foret2006-03-08
|
* fixed a commentaryAurelien Foret2006-03-07
|
* code cleanupAurelien Foret2006-03-07
|
* make cache works when loading it with DEPENDS info onlyAurelien Foret2006-03-04
|
* prepend library function names with _alpm (helped with the patch from ↵Aurelien Foret2006-02-17
| | | | | | VMiklos <vmiklos@frugalware.org>) added log and event callbacks to sync_commit internal transactions
* more code cleanup yetAurelien Foret2006-01-18
|
* more code cleanupAurelien Foret2006-01-16
|
* code cleanupAurelien Foret2006-01-02
|
* patch from VMiklos - use PACKAGE_VERSION instead of PACMAN_VERSIONJudd Vinet2006-01-02
|
* added a debug log when freeing the package cacheAurelien Foret2005-12-31
|
* added INFRQ_DESC back to the package cache so the group cache will workJudd Vinet2005-10-20
|
* Reworked the cache handling to only load DEPENDS info by defaultAurelien Foret2005-10-08
|
* make use of the new list_remove implementationAurelien Foret2005-05-03
|
* logs cleanupAurelien Foret2005-04-24
|
* rework the cache handling to avoid as much as possible calls to db_scan()Aurelien Foret2005-04-23
|
* added logs for cache generationAurelien Foret2005-04-05
|
* Replaced snprintf calls by the SNPRINTF macro to avoid buffer overflows when ↵Aurelien Foret2005-03-29
| | | | copying strings
* added a FREELISTPTR macro to free a PMList without freeing its dataAurelien Foret2005-03-28
|
* Initial revisionJudd Vinet2005-03-15