summaryrefslogtreecommitdiff
path: root/src/pacman/conf.c
Commit message (Collapse)AuthorAge
* HoldPkg reworkNagy Gabor2009-01-12
| | | | | | | | | | | | | | | | | | | The HoldPkg feature is even more important when the packages to be held are pulled automatically by pacman, in a -Rc and -Rs operation. Before, it only applied when the packages were explicitly requested by the user to be removed. This patch extends holdpkg to -Rc and -Rs by doing the HoldPkg check just before trans_commit. Additionally, the whole HoldPkg stuff was moved to the front-end. I changed the default behavior to "don't remove", so I modified remove030.py pactest as well. See also: FS#9173. Original-work-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove unnecessary initialization in new functionsDan McGee2008-09-03
| | | | | | | We don't need to zero things out, we are already using calloc for this purpose. Signed-off-by: Dan McGee <dan@archlinux.org>
* Add SyncFirst option.Chantry Xavier2008-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch offers a way to fix FS#9228. By putting "SyncFirst = pacman" in pacman.conf, the version check will happen before the transaction really starts, and before any replacements is made. Otherwise, no version check is done. The sync301 pactest was updated to use this SyncFirst option. Example session with SyncFirst = pacman, and a newer pacman version available : $ pacman -Su (or pacman -S <any targets>) :: the following packages should be upgraded first : pacman :: Do you want to cancel the current operation :: and upgrade these packages now? [Y/n] resolving dependencies... looking for inter-conflicts... Targets: pacman-x.y.z-t Total Download Size: x.xx MB Total Installed Size: x.xx MB Proceed with installation? [Y/n] n As Nagy previously noted, doing this check on any -S operations might look intrusive, but it can be required. For example, the case where you want to install a package with versioned provisions, using a pacman version which didn't support that feature yet (and there is already a newer pacman in sync db supporting it). Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Make all error messages use pm_fprintfAllan McRae2008-05-11
| | | | | | | | | | Tested using many easily generated error conditions. Also added "malloc failure" (conf.c) and "segmentation fault" (pacman.c) error messages for translation. Signed-off-by: Allan McRae <mcrae_allan@hotmail.com> [Dan: fix trailing whitespace errors, other compilation issues] Signed-off-by: Dan McGee <dan@archlinux.org>
* Update GNU GPL boilerplate and copyright datesDan McGee2007-12-10
| | | | | | | Update the GPL boilerplate to direct people to the GNU website for a copy of the license, as well as bump all of Judd's copyrights to 2007. Signed-off-by: Dan McGee <dan@archlinux.org>
* Make pacman path handling (hopefully) a bit more intuitiveDan McGee2007-12-02
| | | | | | | | | | | | | | | | | | | | I made pacman path handling a bit odd with my rootdir changes a while back in order to increase flexability. However, it had a bit of a drawback in that dbpath/logfile/etc. would not default to being under the rootdir if that was the only parameter you specified in the config file or on the command line. (Note: logfile handling was always broken due to the explicit logfile line required in config files) Pacman now works as follows: if a rootdir is specified but not dbpath or logfile: attempt to place the logfile and dbpath in their default locations under root if an explicit dbpath/logfile is specified: interpret these as absolute paths, regardless of the rootdir setting if nothing is specified: fall back to configured defaults Signed-off-by: Dan McGee <dan@archlinux.org>
* War on whitespaceDan McGee2007-11-16
| | | | | | Run the kernel's cleanfile script on all of our source files. Signed-off-by: Dan McGee <dan@archlinux.org>
* Clean up usage of extern variablesDan McGee2007-11-04
| | | | | | | | Instead of declaring the extern variable in every *.c file, include it in the header file that makes sense. This means handle.h for the handle, and conf.h for the pacman side config object. Signed-off-by: Dan McGee <dan@archlinux.org>
* When printing size_t, use %zdDan McGee2007-10-29
| | | | | | | | %d was used, which worked for Linux and FreeBSD. Not so for Darwin. The warning was probably spat out when compiling on x68_64 as well, but no developers use this architecture as their primary one. Signed-off-by: Dan McGee <dan@archlinux.org>
* Make some small changes recommended by splintDan McGee2007-09-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Post trial install changes, round oneDan McGee2007-08-21
| | | | | | | | | | | | | | A bunch of changes related to my first "real" install of pacman-git into /usr/local and trying to use it. * Shift some uses of free -> FREE in libalpm. * Move stat and sanity checks of config paths into libalpm from the config and argument parsing in pacman.c. * Fix issue where dbpath still was not defined early enough due to its requirement for being used in alpm_db_register. This should be rewritten so it doesn't have this dependency, but this will work for now. 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>
* More pacman side cleanupDan McGee2007-04-26
| | | | | | | | | | | * 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>
* Remove more unnecessary stuffDan McGee2007-04-25
| | | | | | | | | * 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>
* Remove unnecessary includes of downloadprog.hDan McGee2007-04-25
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge single-function header files on pacman sideDan McGee2007-04-25
| | | | | | | 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>
* Add void to functions with empty parameter listDan McGee2007-04-14
| | | | | | | Adding void [eg foo(void) instead of foo()] makes the code more compliant with ANSI C. Signed-off-by: Dan McGee <dan@archlinux.org>
* This commit looks much more monumental than it is. Almost all just #includeDan McGee2007-03-05
| | | | | | | | 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.
* Debug logging changes:Aaron Griffin2007-01-31
| | | | | | | | | | | | | | | | * The --debug params were goofy. New setup allows --debug without params, --debug=<level> where level 1=debug output, 2=debug and download output, 3=debug, download, and function tracing output. This seems more sane to me. * Removed PM_LOG_FLOW1 and PM_LOG_FLOW2. They were just confusing. When adding new functions, it is near impossible to determin if your output should be "flow1" or "flow2" without tracking all the way up the call chain. Rarely would one ever say "ok, lets just show "flow2" output. These have both been replaced with PM_LOG_DEBUG * Removed the need for the root parameter on alpm_initialize. it is now defaulted to PM_ROOT just like dbpath and cachedir. This allows alpm to be initialized BEFORE option parsing in the front end, saving us some duplicate variables in the frontend. * Cleaned up front end variables due to early alpm_initialize call.
* Preliminary checkin for alpm_list conversionAaron Griffin2007-01-19
| | | | | | | | | * 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
* A few minor updates so --root works again.Aaron Griffin2006-12-08
|
* * repo-add script - to add entries to a db file directly from package data ↵Aaron Griffin2006-11-20
| | | | | | | | | | (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
* * Numerous mini valgrind fixes.Aaron Griffin2006-11-14
| | | | | | | | | | * Addition of hacky architecture check in the _splitname function * Removal of libfetch from the archlinux proper - it has been renamed to libdownload and can be found at http://phraktured.net/libdownload * Merge of _some_ of the Frugalware makepkg change - this may still be incomplete * Removal of libftp from cvs proper * PKGBUILD manpage now says 'PKGBUILD' instead of FrugalBuild (he he)
* Merged frugalware changes. Added a few other minor things too, but there's alotAaron Griffin2006-10-15
| | | | to list. The diff should show you 8)
* first stage of i18n stuff from VMiklosJudd Vinet2006-05-15
|
* - removed pacman.hAurelien Foret2006-03-13
| | | | | - removed unuseful extern declarations - set pacman.c internal functions as static
* used MALLOC macro when possibleAurelien Foret2006-02-14
|
* patch from VMiklos - use PACKAGE_VERSION instead of PACMAN_VERSIONJudd Vinet2006-01-02
|
* fixed parseconfig usageAurelien Foret2005-10-29
|
* renamed pmconfig_t to config_tAurelien Foret2005-10-29
|
* added pmconfig_t structure to hold all the configurationAurelien Foret2005-10-28
| | | | (patch from VMiklos <vmiklos@frugalware.org>)
* added a default cachedirJudd Vinet2005-10-20
|
* pacman should work without its configuration file!Aurelien Foret2005-10-10
|
* Merging in recent fixes/additions from 2.9.7Judd Vinet2005-10-07
|
* - added pmo_chomp support (from pacman 2.9.3)Aurelien Foret2005-03-20
| | | | - fixed a typo with pmo_proxyport usage
* added support for the XFERCOMMAND optionAurelien Foret2005-03-20
|
* removed a deprecated placeholderAurelien Foret2005-03-20
|
* Relocated log and transaction stuffs from pacman.c to log.c and trans.cAurelien Foret2005-03-19
|
* Added missing extern declarationAurelien Foret2005-03-16
|
* Initial revisionJudd Vinet2005-03-15