summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/conflict.c
AgeCommit message (Collapse)AuthorFilesLines
2007-03-03* Remove unnecessary call to _alpm_trans_update_depends that was erroringDan McGee1-0/+2
anyway. * Spelling/commenting etc.
2007-03-03* A little more hacking with wchar_t output, but nothing really changed inDan McGee1-2/+2
it. Eventually we'll make progress. * Rewrote the _alpm_splitdep function to behave more like all our other function calls. Use heap instead of stack allocation for the depend struct, so now it needs to be freed by the caller.
2007-03-03Big commit this time:Aaron Griffin1-145/+196
* 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-02-22* debug cleanup (more)Aaron Griffin1-24/+29
* 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%)
2007-02-22* Cleaned up some debug outputAaron Griffin1-9/+19
* 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
2007-02-21* Re-added a compare function for syncpkg's - it was removed without thinkingAaron Griffin1-1/+9
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 **
2007-02-20* Updated conflict checking one last time. You can finally have a file moveDan McGee1-40/+43
from one package to another seemlessly (knock on wood). This is implemented through the use of two skip lists in the trans struct- skip_add and skip_remove, which replace the former trans->skiplist. * Removed an unnecessary function parameter, added a necessary one. * If a package has no backup files, print '(none)' under the heading so it is more obvious. * Updated my TODO list.
2007-02-19* Added some improved debug output to file conflict checking.Dan McGee1-27/+30
* Small change to string in remove.c (translators may or may not have to worry about this, depending on their already existing translation).
2007-02-14* Updated a too-verbose message in pacman/add.c. (shouldn't be an issue withiDan McGee1-102/+123
translations, but may want to update at some point) * More libalpm/conflict.c changes. Optimized more, hopefully won't need too much more than this.
2007-02-14Slightly optimized to remove duplicate strcmp operation.Dan McGee1-7/+14
2007-02-13* Refactored conflict checking within packages. Profiling from Dan showed anAaron Griffin1-26/+46
unbelievable amount of strcmp() calls (25 million) due to the list searching. This has been reimplemented with a set-intersection scheme, due to the fact that file lists are always ordered. - NEEDS TESTING * Minor clean up, "globalized" the str_cmp helper to match the alpm comparison signature, so we can use it elsewhere.
2007-01-30K. Piche <kevin.piche@cgi.com>Aaron Griffin1-0/+12
* ALPM_LOG_FUNCTION macro and all the great work to add this macro everywhere
2007-01-30K. Piche <kpiche@rogers.com>Aaron Griffin1-4/+4
* 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-3/+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-24This mainly deals with code clarity- removing currently unneededAaron Griffin1-1/+1
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-31/+31
* 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
2007-01-18Dan McGee <dpmcgee@gmail.com>Aaron Griffin1-2/+6
* Removed some unnecessary headers and library links * Made things static if possible * Cleaned up makefiles a bit * Fixed some old comments in the code * Fixed some errors the static code checker splint pointed out * Backwards arguments in a memset call in _alpm_db_read (could have been worse) * Other various small fixes Other: * Default to 80 columns when getcols cannot determine display width * Removal of ._install as a valid install file in packages
2006-11-22* Completed getinfo api changes (pmmissing_t, pmtrans_t, etc)Aaron Griffin1-0/+37
* Modified some dependancy checking * Changed "performing local database upgrade" message to be more clear * Change 'usize' to 'isize' in database files * Scriptlet output is now sent to pacman's log file * Limited some debugging output to be more clear
2006-11-20* repo-add script - to add entries to a db file directly from package data ↵Aaron Griffin1-0/+2
(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-31Numerous changes:Aaron Griffin1-2/+2
* 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.
2006-10-20A handful of minor changes:Aaron Griffin1-14/+14
* 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-16Copyright changesAaron Griffin1-0/+1
2006-10-16Applied Frugalware patch from Christian Hamar alias krix <krics@linuxforum.hu>Aaron Griffin1-2/+5
for file-conflict progress bar Also did some CVS cleanup, removing some of the autogenerated files that shouldn't have been there
2006-10-16Applied changes from frugalware:Aaron Griffin1-3/+1
http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=pacman;a=commitdiff;h=20061009002226-e2957-93b82621b6b060312559ea0539699f659bd9cb97.gz
2006-10-15Merged frugalware changes (too many to list). Also added some config fileAaron Griffin1-9/+9
handling changes (support [sections] to carry over to included files - this helps with backwards compatibility with existing pacman config files)
2006-05-15first stage of i18n stuff from VMiklosJudd Vinet1-13/+14
2006-03-07removed db_scan calls - take 2Aurelien Foret1-1/+0
2006-03-07removed db_scan callsAurelien Foret1-3/+20
2006-03-04added more debug logsAurelien Foret1-1/+4
2006-03-02code cleanupAurelien Foret1-3/+1
2006-02-22conflict checks: when doing db-vs-target checks, opt to use the NEWER, ↵Judd Vinet1-2/+20
to-be-installed package instead of the local db version if there's one available
2006-02-17prepend library function names with _alpm (helped with the patch from ↵Aurelien Foret1-31/+30
VMiklos <vmiklos@frugalware.org>) added log and event callbacks to sync_commit internal transactions
2006-02-05added a pmconflict_t structure to handle file conflictsAurelien Foret1-11/+16
2006-02-01fixed typos in 2 debug logsAurelien Foret1-2/+2
2006-01-18more code cleanup yetAurelien Foret1-54/+24
2006-01-17fixed detection for duplicate entries in list of deps/conflictsAurelien Foret1-6/+6
2006-01-17reworked log messagesAurelien Foret1-6/+6
2006-01-17- code cleanupAurelien Foret1-6/+6
- log improvements
2006-01-15pulled out conflict checkings from checkdeps() in its own function: ↵Aurelien Foret1-0/+172
checkconflicts()
2006-01-02patch from VMiklos - use PACKAGE_VERSION instead of PACMAN_VERSIONJudd Vinet1-1/+1
2006-01-02fixed a possible memory corruptionAurelien Foret1-1/+1
2005-10-08Merging in recent fixes/additions from 2.9.7Judd Vinet1-67/+71
2005-10-06Added a CYGWIN define to include header files required to build in a Cygwin ↵Aurelien Foret1-0/+3
environment
2005-04-24fixed a commented MLK in db_find_conflicts()/CHECK1Aurelien Foret1-0/+1
2005-03-22moved db_find_conflicts from db.c to conflict.cAurelien Foret1-0/+162