summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Remove 'buildtype' from libalpm and pacmanDan McGee2007-07-11
| | | | | | | | Remove unused buildtype field from pmpkg_t struct and anything associated with it, as it is unused at the moment. If we need to readd it, it is an easy revert of this commit. Signed-off-by: Dan McGee <dan@archlinux.org>
* Use mbstowcs instead of strlen where applicableSergej Pupykin2007-07-10
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* 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>
* Cleanup of pacman_deptest()Andrew Fyfe2007-07-10
| | | | | | | | Clean up some left over code from http://projects.archlinux.org/git/gitweb.cgi?p=pacman.git;a=commitdiff;h=7653bb93997f52848b54ab80868cd6da52808a75 Signed-off-by: Andrew Fyfe <andrew@neptune-one.net> Signed-off-by: Dan McGee <dan@archlinux.org>
* Change the exit code for pacman_deptest().Andrew Fyfe2007-07-09
| | | | | | | | Changed the exit code for missing deps from 1 to 127 because 1 is used for other errors. makepkg breaks if pacman exits with 1 for any reason other than a missing dep. Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
* Remove gettext from any alpm_logaction callsDan McGee2007-07-09
| | | | | | | We shouldn't translate log messages to pacman.log so it is consistant and can be parsed by other tools. Remove all gettext _() around these strings. Signed-off-by: Dan McGee <dan@archlinux.org>
* First step of moving translations from src/pacman/po to po/Dan McGee2007-07-06
| | | | | | | | | Move the translations from src/pacman/po to just po/ so we can include the scripts gettext translations in the same message catalog as that of the pacman frontend. The libalpm message catalog, for now, will remain a separate existence. Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman/query.c : return after a query on all packages.Chantry Xavier2007-07-02
| | | | | | | | | Previously, the following error was displayed even after a valid and successful query operation on all packages, like -Q , -Ql, -Qi, -Qil : no targets specified (use -h for help) Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* pacman/packages.c : print an error for files that can't be stated.Chantry Xavier2007-07-01
| | | | | | | | | | | The -Ql operation is supposed to print all files but directories. stat was used for detecting directories. However, when stat failed, (because the file doesn't exist or is not readable), the files were still displayed just like the others. Now, these files are printed on stderr, with the corresponding error message. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* Remove lockfile configuration from frontend, make it job of libalpmDan McGee2007-06-27
| | | | | | | | | | | | I previously introduced some patches to make just about every path in pacman/libalpm configurable; doing this with the lockfile seemed a bit too far and we really should just place the lockfile where it belongs- with the DB that needs locking. More details in this thread: http://archlinux.org/pipermail/pacman-dev/2007-June/008499.html Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman.c: make parseconfig a bit more robustDan McGee2007-06-27
| | | | | | Don't let parseconfig overwrite settings that parseargs already made. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove scriptlet START and DONE commands that we don't useDan McGee2007-06-27
| | | | | | | | The scriptlet calling had some unneeded complexity for the time being which we aren't using here. Let's get rid of it until we find a good way to implement it correctly. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove some use of goto in the pacman frontendDan McGee2007-06-17
| | | | | | | Refactor the goto cleanup; statements out of add.c and remove.c, and move what the cleanup: label did into a function. Signed-off-by: Dan McGee <dan@archlinux.org>
* Clean up pacman/sync.c and organize it a bitDan McGee2007-06-13
| | | | | | | | Re-add some checks for a valid target list. In addition, move variable declarations to the most local scope possible, which should help in finding errors that were previously uncaught. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove some more diskspace checking holdover stuffDan McGee2007-06-13
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Functionalize query.c and pacman_queryDan McGee2007-06-12
| | | | | | | | | | | | Move a lot of the operations that pacman query performs into their own functions for ease of following the flow and for possible later merges with their sync counterparts. We need to think less in terms of operations and more in term of overall concepts. Also (re)introduced checks for the target list on a -Q operation, ensuring that we only call certain query operations when it is sane to do so. Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman util.h: Add missing stdarg.h includeDan McGee2007-06-12
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Implement simple topological sort algorithm for sortbydepsNagy Gabor2007-06-10
| | | | | | | | | | | | | | | | Based on the "depth first search" algorithm, for more infos visit: http://en.wikipedia.org/wiki/Topological_sorting The previous algorithm used by sortbydeps was too slow, and to work around it the number of steps needed to get correct result was reduced greatly. So it produced wrong results in several cases : 1) smoke001.py 2) http://bugs.archlinux.org/task/7229 More here: http://archlinux.org/pipermail/pacman-dev/2007-April/008057.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Ensure correct and consistent usage of depmissChantry Xavier2007-06-10
| | | | | | | | | See comment from Nagy here : http://www.archlinux.org/pipermail/pacman-dev/2007-April/008134.html This also makes easier correct usage of checkdeps in sync.c, which fixes sync901 pactest (and so bug 6057). Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman.c: Refine error messages used by parseconfigDan McGee2007-06-09
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Allow multiple CacheDirs to be specifiedDan McGee2007-06-09
| | | | | | | | | This should hopefully allow multiple cache dirs to be specified in pacman.conf and/or on the command line, and allow pacman to test each one for the package file. The first one found to be writeable is used as the download cache. Signed-off-by: Dan McGee <dan@archlinux.org>
* Implement a -Qt operation in frontend to test the databaseDan McGee2007-06-09
| | | | | | | | After adding a alpm_db_check() operation in the back end, we can call it in the front end and present a user-friendly interface to it. Inspired-by: VMiklos <vmiklos@frugalware.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix up things after the last few changesDan McGee2007-06-09
| | | | | | | | | * Readd default logmask of ERROR and WARNING * Remove DOWNLOAD log level as it no longer applies * Add 'no targets' logic back in where it applies * Switch some prints in parseconfig to ERROR Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove logmask stuff from backend; switch logging callback to new pm_printfDan McGee2007-06-09
| | | | | | | | | | Remove the logmask functionality from the backend as it has been moved to the frontend, and change the logging callback function to use pm_printf. In addition, make much better use of va_list- use the args list instead of a arbitrarily chosen string to print to in the logging functions. Signed-off-by: Dan McGee <dan@archlinux.org>
* Revamp pacman.c main function ordering, switch some output to pm_printfDan McGee2007-06-09
| | | | | | | | | | Reorder some of the initilization stuff in pacman.c, as well as remove some code that should be reimplemented elsewhere- checking the target list to see if it is NULL. Change the temp printf statements in parseconfig to pm_printf as well. Signed-off-by: Dan McGee <dan@archlinux.org>
* Add a series of pm_printf functions to pacman frontendDan McGee2007-06-09
| | | | | | | | | Add pm_printf, pm_fprintf, and pm_vfprintf to the pacman frontend for use by debug printing and other output messages from pacman. These will be incorporated into the log callback functions in the next iteration of changes. 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>
* Merge branch 'alpm.c_cleanup' into frontend_configDan McGee2007-06-04
|\ | | | | | | | | | | Conflicts: lib/libalpm/alpm.c
| * Move functions out of alpm.c to where they belongDan McGee2007-06-04
| | | | | | | | | | | | | | | | alpm.h is the only "publically viewable" file, so there is no reason to have functions in alpm.c that belong in package.c, db.c, etc. Move the functions where they belong and leave only the library init functions in alpm.c. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Fix up outstanding parseconfig issuesDan McGee2007-06-04
| | | | | | | | | | | | | | | | The db variable was left unset when calling alpm_db_register, leading to a failure to ever register a sync db. Also added a check to ensure DBPath was set when trying to register a database. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Rip alpm_parse_config out of libalpmDan McGee2007-06-04
| | | | | | | | | | | | | | | | | | | | 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>
* | Move three config options out of the backendDan McGee2007-06-04
| | | | | | | | | | | | | | | | Move chomp, usecolor, and showsize out of the backend and into the pacman frontend as they are pacman-specific options and not related to the behavior of libalpm. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add a parseconfig to the pacman frontend that compilesDan McGee2007-06-04
|/ | | | | | Warning: this compiles but may not work as intended quite yet. :) Signed-off-by: Dan McGee <dan@archlinux.org>
* Autotool clean up.Andrew Fyfe2007-06-04
| | | | | | | | | * Add vim modeline to Makefile.am and configure.ac * Fix white space in Makefile.am and configure.ac * Add contrib/wget-xdelta.sh to EXTRA_DIST in Makefile.am Signed-off-by: Andrew Fyfe <andrew@neptune-one.net> Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Polish TranslationJaroslaw Swierczynski2007-06-04
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove hardcoded defines from libalpmDan McGee2007-06-04
| | | | | | | | Remove any use of the former path variables defined by the Makefiles or config.h. These are now runtime configurable only with pacman.conf (or by using flags on the command line). Signed-off-by: Dan McGee <dan@archlinux.org>
* Move parts of pacman_query into subfunctions (query_search, query_group, ↵Chantry Xavier2007-06-02
| | | | | | | | | | | query_isfile) Clean up pacman_query so functionality is actually in functions, similar to how sync.c is organized. After doing this, it is easy to see similarity in the code between sync.c and query.c, so we should be able to consolidate some of this. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Change -z|--showsize flag to ShowSize pacman.conf optionNathan Jones2007-06-01
| | | | | | | Also cleaned up some duplicate printf lines related to the ShowSize option. Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Updated Spanish TranslationJuan Pablo González T2007-06-01
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Move DB and cache dirs away from there dependence on ROOTDIRDan McGee2007-05-31
| | | | | | | | | | | | | | | | | | | 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>
* Set an error exit status on -Qi or -Si failureDan McGee2007-05-31
| | | | | | | Regression from 2.9.8 where a failed -Qi lookup did not return an error on exit. The exit status is now incremented for each error encountered. Signed-off-by: Dan McGee <dan@archlinux.org>
* Modernize and update configure.acDan McGee2007-05-30
| | | | | | | | Using the autoscan tool, ensure we are doing the checks we should be doing in configure.ac. There is still more work to do, but this is a start at cleaning up the file a bit to make it much easier to change in the future. Signed-off-by: Dan McGee <dan@archlinux.org>
* Update POTFILES.in for new source file layout on pacman sideDan McGee2007-05-29
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Add missing new line to 'pacman -T' output.Andrew Fyfe2007-05-24
| | | | | | | | | | 'pacman -T foo bar' returns 'foobar' instead of: foo bar Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>o Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
* Add -Qee option for the original behavior of -QeChantry Xavier2007-05-20
| | | | | | | | | | | -Qee now lists "orphans" the way pacman used to - that is, -Qe lists packages required by nothing that were installed as a dependency, but -Qee lists all packages not required by something else. Also, I snuck in a compile fix for my real_path cleanup earlier, heh Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
* Fix broken resolve_path functionAaron Griffin2007-05-18
| | | | | | | Removed some unneeded path munging so that our relative paths resolve properly. This closes FS#7068 Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
* Remove unnecessary casts on malloc and elsewhereDan McGee2007-05-14
| | | | | | | | | 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>
* Display size for packagesNathan Jones2007-05-14
| | | | | | | | | This patch adds a -z|--showsize option to the -Q and -S commands. The option displays the size of individual packages. This is something that I have wanted for a while, and there is a feature request for it. Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Clean up query_fileownerDan McGee2007-05-07
| | | | | | | * gotcha -> found * line wrap changes Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove 'removes' array from libalpmDan McGee2007-04-28
| | | | | | | We don't use this functionality for now, so get rid of it and the functions associated with it. Signed-off-by: Dan McGee <dan@archlinux.org>