summaryrefslogtreecommitdiffstats
path: root/src/pacman/pacman.c
AgeCommit message (Collapse)AuthorFilesLines
2007-08-16pacman.c: Alphabetize listing of query optionsDan McGee1-3/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-16new query options : explicit (-Qe) and deps (-Qd).Chantry Xavier1-8/+17
The t shortcut for --test was removed, the orphan option (previously -Qe) was renamed to -Qt, -Qe lists all packages installed explictly, and -Qd lists all packages installed as dependencies. Besides, t can be combined with either e or d. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-23Cleanup of pacman.c and addition of default paths to frontendDan McGee1-40/+51
Instead of barfing when the root path and db path haven't been defined, have pacman set them to some sane defaults when they aren't specified on either the command line or the config file. Also do some cleaning of error output and Doxygen comments. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-15Add --asdeps option to pacmanDan McGee1-2/+9
This replaces the former -D operation that was undocumented and rather hacky. It can be used with add, upgrade, or sync transactions and will affect all packages installed. Should close FS #7193. Also tell makepkg to use this new flag. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-10Remove gettext calls from all PM_LOG_DEBUG messagesDan McGee1-22/+22
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>
2007-06-28Remove lockfile configuration from frontend, make it job of libalpmDan McGee1-10/+0
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>
2007-06-28pacman.c: make parseconfig a bit more robustDan McGee1-12/+21
Don't let parseconfig overwrite settings that parseargs already made. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-09pacman.c: Refine error messages used by parseconfigDan McGee1-7/+14
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-09Allow multiple CacheDirs to be specifiedDan McGee1-4/+10
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>
2007-06-09Implement a -Qt operation in frontend to test the databaseDan McGee1-1/+6
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>
2007-06-09Fix up things after the last few changesDan McGee1-36/+22
* 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>
2007-06-09Revamp pacman.c main function ordering, switch some output to pm_printfDan McGee1-75/+62
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>
2007-06-05Fix up outstanding parseconfig issuesDan McGee1-17/+25
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>
2007-06-05Rip alpm_parse_config out of libalpmDan McGee1-33/+36
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>
2007-06-05Move three config options out of the backendDan McGee1-3/+3
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>
2007-06-05Add a parseconfig to the pacman frontend that compilesDan McGee1-0/+212
Warning: this compiles but may not work as intended quite yet. :) Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-04Remove hardcoded defines from libalpmDan McGee1-3/+3
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>
2007-06-01Change -z|--showsize flag to ShowSize pacman.conf optionNathan Jones1-4/+0
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>
2007-05-31Move DB and cache dirs away from there dependence on ROOTDIRDan McGee1-6/+14
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>
2007-05-20Add -Qee option for the original behavior of -QeChantry Xavier1-1/+1
-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>
2007-05-14Display size for packagesNathan Jones1-1/+5
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>
2007-04-28Set HTTP_USER_AGENT envvar in pacmanDan McGee1-0/+20
Instead of using libdownload's default user agent string, make one of our own. Format: Pacman/3.0.1 (Linux i686 2.6.21-rc7-ARCH; en_US.utf8) libalpm/1.0.0 Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-28Add a cb_log call on segfaultsDan McGee1-0/+2
This should make it easier to see exactly where a segfault occurs; old method was prone to output flushing issues. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-27Remove output.c and output.hDan McGee1-1/+0
One function was left in this set of files after the earlier cleansing, so I moved yesno to util.c. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-26Remove ERR calls from the codeDan McGee1-15/+26
All ERR() calls have been replaced with fprintf(stderr, ...). Still to be done- fix all the newline issues that are sure to pop up. What fun! Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-26Remove MSG output macro (#define and in code)Dan McGee1-9/+2
This is the first step of converting output to standard functions such as printf, and eventually allowing compiliation with the -pedantic flag as is done on the libalpm side. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-26Move log.c/h -> output.c/h to properly reflect what is containedDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-26Pacman side code consolidation- unify callback functions to one fileDan McGee1-2/+2
Some more major code reorginization here. The download progress callback function has been renamed and moved to callback.c, which is the former trans.c with the download and log callbacks added. In addition, this allows util.c to be cleaned up as fill_progress can now be static in callback.c. We've also cut two more source files out. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-26More pacman side cleanupDan McGee1-34/+24
* Cleaned up more of the header #includes, and got rid of a lot of stuff that was due to trying to make it compile on BSD/Darwin/CYGWIN. We can add it later but lets keep it simple for now and do it in seperate files if possible later. * Removed a lot of #define MACROS. Some were not even used, and others were only used a few times. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-26Allow sync search to work without argumentsDan McGee1-3/+8
Enable an -Ss operation to work without a target list. This allows all package information to be printed (as opposed to individual -Sl operations on repositories). Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-25Remove more unnecessary stuffDan McGee1-1/+4
* Remove libintl.h from most files, as we only need to include it once in util.h where _() is defined. * Remove other unnecessary header inclusions. * Remove a macro that was only used once and replaced it with actual code. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-25Merge single-function header files on pacman sideDan McGee1-7/+3
Having a seperate header file for add, remove, query, etc. seemed overkill. Merge them all into a common pacman.h and fix the necessary #includes. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-14Add void to functions with empty parameter listDan McGee1-2/+2
Adding void [eg foo(void) instead of foo()] makes the code more compliant with ANSI C. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-02Remove some debug print statements that were left in on accidentDan McGee1-2/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-01Clean up pacman.c, add localize functionDan McGee1-25/+48
* Add a localize function to do what was done before in main wrt i18n initialization. * Added Doxygen comments to all functions in pacman.c. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-03-30Make all paths and file locations configurableDan McGee1-1/+1
Several important paths, file locations, and extensions were #define-d in the source code instead of being configurable. This moves all of these to the configure script where they can be picked upon running ./configure. We may later want to make some of these even more visible and move them to pacman.conf. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-03-28Continue fixing usage instructions.Dan McGee1-4/+6
* Unify the main usage instructions to look a bit more like the rest with a usage and options line. * Fix some of the spacing from the de-gettexting done yesterday. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-03-28Improve pacman.c gettext usageDan McGee1-24/+34
* Break out a few strings in pacman.c that are used repeatedly to reduce unnecessary translations. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-03-22Clarify some English messages as suggested by Nagy Gabor. I even did the hardDan McGee1-5/+5
work of fixing these in the translation files, and I removed a few fuzzys while doing so. If any more patches for translations come, try to do it against these files.
2007-03-22Giovanni Scafora <linuxmania@gmail.com>Aaron Griffin1-1/+1
* Fix typo in pacman.c
2007-03-21* pacman.c: Add CacheDir to -v --verbose output.Dan McGee1-3/+4
2007-03-19* Updated Italian translationDan McGee1-1/+1
Giovanni Scafora <linuxmania@gmail.com> * Many minor issues mentioned by Scott Horowitz <stonecrest@gmail.com>. - extra 'done' text in --noprogressbar output - missing flags in the pacman.8 manpage - unclear text in --noconfirm help description
2007-03-19James Rosten <seinfeld90@gmail.com>Dan McGee1-0/+1
* Add missing help line for --sync --list.
2007-03-07* Updated -V output to include the 2007 copyright date.Aaron Griffin1-1/+1
2007-03-05This commit looks much more monumental than it is. Almost all just #includeDan McGee1-0/+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-04* Fixed the handle realroot stuffAaron Griffin1-1/+2
* Added some {}
2007-02-26* pacman hidden arguments: removed -Y and -D. -T is the only hidden arg now, toAaron Griffin1-10/+1
be used in place of -Y. Also, -D was rather silly, as it does mostly what -S does. * Cleaned up pacman_deptest - removed the goofy faketarget stuff (NEEDS testing still) * libalpm function renames
2007-02-23We don't need this anymoreAaron Griffin1-1/+1
2007-02-22Big commit here, I'll try to cover all the bases.Dan McGee1-1/+1
* Updated all of the language files, as the POT file was updated. NOTE FOR TRANSLATORS, try to base your next contribution off of these, notice how some msgids and messages have been wrapped to the next line- it makes it easier to read anyway. * More Makefile.am/configure.ac updates. 'make dist' and 'make distclean' now work properly, with only one caveat- the automatic testing in distclean doesn't do so hot as it is compiled with a default configure, which includes the fakeroot-proof code (which does not cooperate with pactest). * Added a Makefile.am for the pactest directory.
2007-02-21* Looks like I left some debugging code in thereAaron Griffin1-2/+0