1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-23 08:18:51 -05:00

Just some changes to my TODO

This commit is contained in:
Aaron Griffin 2007-02-23 02:15:00 +00:00
parent d584d8c068
commit a474586d15

View File

@ -19,50 +19,37 @@
to evaluate both a bit more. to evaluate both a bit more.
* src/pacman: * src/pacman:
- There's quite a few single function headers which contain the pacman_* There's quite a few single function headers which contain the pacman_*
functions. We should move these to a single header (pacman.h) to clean up functions. We should move these to a single header (pacman.h) to clean up
the source a bit. the source a bit.
* lib/libalpm: * libalpm -> front end communication needs a work-up. Both progress functions
- move logging (alpm_logaction) out of the library. log files should be can be combined into one callback, IFF we adjust it to accept a prefix string
written by the app, not the library. Adding a PM_LOG_* constant that for the progress bars, and format it at the lib side. Question functions
frontends can recognize and send to a file is probably a good idea. should also do the same - create the string at the library side, and simply
- clear up list allocation/deallocation - some lists need to be free'd, some call some sort of int yes_no = ask_question("Do foo with bar?");
do not and there is no clear indication WHEN this should happen.
- remove DB entries (directories) on a read error? * move logging (alpm_logaction) out of the library. log files should be
- Add a pm_errstr error string, which will allow us to do things like: written by the app, not the library. Adding a PM_LOG_* constant that
pm_errno = PM_ERR_LIBARCHIVE; frontends can recognize and send to a file is probably a good idea.
pm_errstr = archive_error_string(archive);
or: * clear up list allocation/deallocation - some lists need to be free'd, some
pm_errno = PM_ERR_LIBDOWNLOAD; do not and there is no clear indication WHEN this should happen.
pm_errstr = downloadLastErrString;
This way we don't break abstraction when returning specific errors in * remove DB entries (directories) on a read error?
cases like the above.
* Add a pm_errstr error string, which will allow us to do things like:
pm_errno = PM_ERR_LIBARCHIVE;
pm_errstr = archive_error_string(archive);
or:
pm_errno = PM_ERR_LIBDOWNLOAD;
pm_errstr = downloadLastErrString;
This way we don't break abstraction when returning specific errors in
cases like the above.
* pacman: A LOT of functions are way too long. There should be an upper limit of * pacman: A LOT of functions are way too long. There should be an upper limit of
100-200 lines. _alpm_add_commit is around 600 lines, and is far too complex. 100-200 lines. _alpm_add_commit is around 600 lines, and is far too complex.
Quite a lot of this needs to be refactored as we go.
Function list (from Dan McGee):
add.c:
_alpm_add_commit
be_files.c:
_alpm_db_read
_alpm_db_write
conflict.c:
_alpm_checkconflicts
_alpm_db_find_conflicts
package.c:
_alpm_pkg_load (getting a bit long)
remove.c:
_alpm_remove_commit
server.c:
_alpm_downloadfiles_forreal
sync.c:
_alpm_sync_sysupgrade (getting there)
_alpm_sync_prepare
_alpm_sync_commit
* pacman: fixup doxygen documentation for public interface * pacman: fixup doxygen documentation for public interface
* libalpm: just because a function is in alpm.h doesn't mean it needs to be in * libalpm: just because a function is in alpm.h doesn't mean it needs to be in
@ -89,5 +76,3 @@
**** BUGS **** **** BUGS ****
* Removal of conflicts on -A and -U (INCOMPLETE) * Removal of conflicts on -A and -U (INCOMPLETE)
* pacman: add pactest cases/functionality for all -Q operations and make sure
the output is sane