summaryrefslogtreecommitdiffstats
path: root/src/pacman/Makefile.am
AgeCommit message (Collapse)AuthorFilesLines
2017-01-04pacman: ensure linkage against libarchiveDave Reisner1-1/+4
Fixes build on ubuntu/debian platforms. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-12-05move signal handlers to sighandler.[ch]Andrew Gregory1-0/+1
Signals are special because they run asynchronously, making them non-trivial to handle correctly. Move the handlers a separate file to offset them from the normal code and make them easier to separate into individual functions without further cluttering pacman.c Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-18pacman: add user hook directoriesAndrew Gregory1-0/+2
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-07-15Prototype pacman files database operationsAllan McRae1-0/+1
Add the -F/--files operations, -s/--sync support and nd provide dummy functions for -s/--search, -l/-list and -o/--owns. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-12Fix compilation if libarchive headers are not in standard locationCharles Duffy1-1/+2
With commit 097d5a478b32, including alpm.h also drags in archive.h. Ensure the tools we build that depend on ALPM also include the necessary flags to find libarchive headers if they are not installed in a standard location. [Dan: Add commit message] Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-28Remove ts and sw from vim modeline when noet is setFlorian Pritz1-1/+1
Forcing vim users to view files with a tabstop of 2 seems really unnecessary when noet is set. I find it much easier to read code with ts=4 and I dislike having to override the modeline by hand. Command run: find . -type f -exec sed -i '/vim.* noet/s# ts=2 sw=2##' {} + Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21conf.c: extract ini parsing code to separate filesAndrew Gregory1-0/+1
Move _parseconfig to ini.c as _parse_ini and create a convenient wrapper for the public API. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-04Split common utility functions for libalpm and pacmanAllan McRae1-1/+2
There is duplicated code in the util.c files in the libalpm and pacman source code. Split this into a separate file so that it can be shared via a symlink. This prevents code divergence between the two code bases. Also, move mbasename and mdirname from pacman/util.c into util-common.c in preparation for the following patch that uses them to add an extension to pacsave files. Signed-off-by: Allan McRae <allan@archlinux.org>
2012-12-14Move check function into its own fileAllan McRae1-0/+1
There is going to be a lot of overlap in the code for the quick and full checks that can be abstracted into their own functions. Also many other file checking functions will be needed for the full check. Put all these in a separate source file. Signed-off-by: Allan McRae <allan@archlinux.org>
2012-11-27buildsys: eschew use of DEFS, prefer AM_CPPFLAGSDave Reisner1-10/+8
This is redundant, and any usage of -D should belong to CPPFLAGS. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2012-04-09buildsys: define warning CFLAGS in separate varDave Reisner1-1/+1
Continue the trend of not touching the environment CFLAGS, ensuring that the user always has the final say. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-02-13Move ROOTDIR definition into config.hAllan McRae1-1/+0
This was the only variable of its kind when a define was done on the compiler command line. Move it into config.h instead. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-22include config.h via MakefilesDave Reisner1-1/+4
Ensures that config.h is always ordered correctly (first) in the includes. Also means that new source files get this for free without having to remember to add it. We opt for -imacros over -include as its more portable, and the added constraint by -imacros doesn't bother us for config.h. This also touches the HACKING file to remove the explicit mention of config.h as part of the includes. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24po/: split into scripts/po/ and src/pacman/po/Dan McGee1-0/+2
This is the first step at separating the pacman message catalog and the scripts message catalog. Makefiles, configure.ac, and other such files are adjusted accordingly, as well as renaming files. The TEXTDOMAIN of scripts is also adjusted. Note that no actual pot or po files get changed here; these will get pruned in a future commit so each catalog contains only the necessary messages. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23Let pacman specify GnuPG's home directory.Chris Brannon1-0/+2
GnuPG looks for configuration files and keyrings in its home directory. For a user, that is typically ~/.gnupg. This patch causes pacman to use /etc/pacman.d/gnupg/ as the default GnuPG home. One may override the default using --gpgdir on the command-line or GPGDir in pacman's configuration file. Signed-off-by: Chris Brannon <cmbrannon@cox.net> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22Makefile: Use git describe --dirty for GIT VERSIONXavier Chantry1-1/+1
dirty indicates if the repo has uncommited changes or not when building, so dont hardcode this info. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-05Introduce -D, --databaseNagy Gabor1-0/+1
The request of FS#12950 is implemented. On the backend side, I introduced a new function, alpm_db_set_pkgreason(), to modify the install reason of a package in the local database. On the front-end side, I introduced a new main operation, -D/--database, which has two options, --asdeps and --asexplicit. I documented this in pacman manual. I've created two pactests to test -D: database001.py and database002.py. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-16Remove pacman.static build from build filesDan McGee1-7/+0
This presents plenty of problems on OSes besides Linux, and even on Linux when the libtool file for libarchive isn't present. The static build isn't all that useful anyway as missing something such as glibc will still leave you unable to run the pacman.static binary. Remove it from the formal build process. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-05-31Allow GIT version to be used in pacman buildsDan McGee1-0/+5
Add a new configure flag, --enable-git-version, that allows the output of 'git describe' to be used in the version string associated with this package. This could aid in debugging for users that are using a development version of pacman and we should be able to figure out which cut of code they are using. Sample output: $ pacman --version Pacman v3.1.4-190-g4cfa-dirty - libalpm v2.3.1 $ makepkg --version makepkg (pacman) 3.1.4-190-g5861-dirty Signed-off-by: Dan McGee <dan@archlinux.org>
2008-04-16Merge branch 'maint'Dan McGee1-2/+1
2008-04-15Fix gettext on non-Linux platformsDan McGee1-2/+1
Linux includes all the gettext stuff in glibc, so there is no need for the libintl links which we failed to include in our linker variables. Update the makefiles which should enable NLS support on all platforms, including OS X and Cygwin. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-08Remove frontend add code that is no longer necessaryDan McGee1-1/+1
Change the pacman_upgrade stub function to do what pacman_add used to do so we can eliminate pacman_add. Move the code to the more-descriptive name of upgrade.c. Note that we have made no changes to the backend libalpm, where an ADD type transaction could still be supported. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-06Add LOGFILE as a define at compile time for pacmanDan McGee1-0/+2
It has always been a bit odd that logfile had to be specified in the config file, but no other paths did. Add LOGFILE as a preprocessor definition, and make a call to alpm_option_set_logfile() to set the default location so no logfile parameter is necessary in pacman.conf. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04Make building of pacman.static optionalDan McGee1-1/+5
Because building of pacman.static fails on some platforms, we should make it optional. It is enabled by default but can be disabled with the use of the --disable-pacman-static flag. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-27Clean up LDADD usageDan McGee1-4/+2
We had a lot of unnecessary overstatements of libraries to include on linking, and autoconf/automake takes care of this for us. This also helps some compilation issues on other platforms. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-22Add a default cachedir if one wasn't specifiedDan McGee1-0/+2
Use the default cachedir (specified at compile time) if one wasn't specified on the command line or in the config file. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-23Cleanup of pacman.c and addition of default paths to frontendDan McGee1-0/+3
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-06First step of moving translations from src/pacman/po to po/Dan McGee1-2/+0
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>
2007-06-28Remove lockfile configuration from frontend, make it job of libalpmDan McGee1-1/+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-11Implement simple topological sort algorithm for sortbydepsNagy Gabor1-2/+2
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>
2007-06-05Autotool clean up.Andrew Fyfe1-2/+4
* 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>
2007-06-04Remove hardcoded defines from libalpmDan McGee1-1/+0
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-05-31Move DB and cache dirs away from there dependence on ROOTDIRDan McGee1-2/+8
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-30Modernize and update configure.acDan McGee1-5/+1
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>
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-26Add -pedantic flag to pacman (frontend) CFLAGSDan McGee1-1/+1
Now that we got rid of the ERR and WARN macros, compilation with -pedantic turned on works with only minor changes. 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/+1
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-25Remove single-function upgrade.cDan McGee1-1/+0
Move pacman_upgrade into add.c, at least for now. It really doesn't need its own file. For the long term, we may want to move this whole file back to upgrade.c if we deprecate the add operation. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-25Merge single-function header files on pacman sideDan McGee1-7/+7
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-03-12* Removed ${CFLAGS} from Makefile.am(s) as it was causing all CFLAGS to beDan McGee1-1/+1
duplicated. * Updated the util Makefile.am to link with the proper libalpm.la. * Fixed bitmasking issues in be_files.c and db.h. * Rankmirrors updates from James Rosten (with some cleaning up of my own). KeyboardInterrupts are now handled gracefully.
2007-02-22* A lot of Makefile.am updates to try to get 'make dist' and 'make distcheck'Dan McGee1-11/+22
to work as expected.
2007-02-21* Use the libtool'd .la file as a link target so we can run pactest properlyAaron Griffin1-1/+1
2007-02-10Cleaned up some more outputAaron Griffin1-4/+4
* Questions no longer start with "error:" * downloaded size is output as a float now
2007-01-29* Fix building outside $(srcdir).Jürgen Hötzel1-2/+2
* Removed ./gen-mirrorlist.sh invocation from configure script: Mirror-files are generated by make, not configure.
2007-01-26Dan McGee <dpmcgee@gmail.com>Aaron Griffin1-2/+2
* Lots of code cleanup, and type fixes * Make 'makeworld' a bit more in-line with the other stuff * Make -Si and -Qi operations appear the same
2007-01-19Preliminary checkin for alpm_list conversionAaron Griffin1-1/+1
* 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/+2
* 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-12-28Configuration changes:Aaron Griffin1-1/+5
* Added libdownload check in configure.ac * Added generation for mirrorlists in pacman.d NOTE: autoconf sucks for things like this, so gen-mirrorlist is required Dan McGee <dpmcgee@gmail.com>: * mirrorlist.in file Roman Kyrylych <roman.kyrylych@gmail.com>: * ukrainian mirror Jürgen Hötzel <juergen@hoetzel.info>: * conditional build for pacman.static
2006-11-20* repo-add script - to add entries to a db file directly from package data ↵Aaron Griffin1-2/+1
(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