summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/alpm_list.c
AgeCommit message (Collapse)AuthorFilesLines
2007-05-14Remove unnecessary casts on malloc and elsewhereDan McGee1-1/+1
We had many unnecessary casts, most of them dealing with malloc and other memory allocations. The variable type should take care of it; no need to do it explicitly. In addition, I caught a const error while removing the casts. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-28Remove FREESERVER macro and correctly type _alpm_server_freeDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-03-29Doxygen fixups for libalpmDan McGee1-81/+158
We haven't done a whole lot with Doxygen so far, so this updates some of the things that have changed a lot- namely, the now public exposure of alpm_list. All functions in this file have now been Doxygen commented, and a few other things in alpm.c were fixed as well. In addition, the Doxygen config file was updated. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-03-11* Fix group comparison issue and associated compilation warnings by usingDan McGee1-2/+2
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.
2007-03-05This commit looks much more monumental than it is. Almost all just #includeDan McGee1-1/+2
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.
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* Modified values of INFRQ_* options so we start at 0x01 and not 0x00. ThisDan McGee1-1/+1
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* Switched some functions to alpm_pkg_get_* usage as I came across themAaron Griffin1-0/+27
* Added some provision switching hackery. This could probably use some refactoring,.. it solves the following case: pkg1 and pkg2 provide 'foo' and are both installed pkg3 depends on 'foo' and so lists 'pkg1' in the REQUIREDBY db section pkg1 is upgraded and no longer provides 'foo' ** This code ensures that the REQUIREDBY of pkg3 is updated to require pkg2 now instead of pkg1
2007-01-30K. Piche <kpiche@rogers.com>Aaron Griffin1-8/+8
* gcc visiblity changes Also modified _alpm_versioncmp -> alpm_versioncmp (public function) as per K. Piche's suggestions
2007-01-30Discussed on IRC for a bit, this makes the following changes for clarity:Dan McGee1-4/+4
* 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.
2007-01-24* Shuffled some of the alpm_list free funtions - still not perfect, but betterAaron Griffin1-13/+42
* 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
2007-01-23* Added some calloc calls to replace the malloc-then-set-to-zero functionalityAaron Griffin1-1/+4
* Fixed -Ss output so as not to call alpm_list_getdata with a NULl list * Added a NULL check in alpm_list_getdata * Fixed alpm_list_add_sorted to properly handle a new / beginning insertions
2007-01-22Introduced an infinite loop during the pmlist -> alpm_list transition, whoopsAaron Griffin1-0/+1
2007-01-19Preliminary checkin for alpm_list conversionAaron Griffin1-0/+429
* 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