summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-10-14do not run scriptlets with --dbonlyAndrew Gregory1-0/+1
Running an install script does not fall under "Adds/removes the database entry only." Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14imply --print from --print-formatAndrew Gregory2-1/+2
--print-format is totally useless without --print. Implying --print will also save us the hassle of checking it when we add transaction option validation. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14use non-ascii identifiers for optflagsAndrew Gregory2-70/+206
Removes the overlap between optflags for different operations that allowed non-sensical combinations of flags such as: $ pacman -Si --changelog $package --changelog is -c, meaning --clean for -S $ pacman -Q --sysupgrade --sysupgrade is -u, meaning --upgrades for -Q Also add a few missing braces. Original-work-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14pacman/util: remove strsplitAndrew Gregory3-40/+5
strsplit was used in only one place and did the same thing as strtok. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14submitting-patches: address common mistakesAndrew Gregory1-4/+11
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14remove executable bit on paclog-pkglist.sh.inAndrew Gregory1-0/+0
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Makefile.am: remove old targets from .PHONYAndrew Gregory1-1/+1
These targets were part of the old test suite and no longer exist. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Jettison the truncation of the display of pmrules.Jeremy Heiner1-3/+1
The truncation helped back when the test output appeared when run via make. But now "make check" logs that output, and it makes little sense to log the truncated rules. Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14makepkg: add LIBRARY variableAllan McRae2-0/+5
This points makepkg to where is library is located. Can be overridden by value in the environment. Signed-off-by: Allan McRae <allan@archlinux.org> [Ashley: Rebased] Signed-off-by: Ashley Whetter <ashley@awhetter.co.uk>
2013-10-14makepkg: run locally with libtool style wrapperAllan McRae3-0/+49
Build makepkg to scripts/.lib/makepkg and add a wrapper script to call it. This is not useful at the moment, but is the first step to allowing makepkg to be split into smaller pieces. Signed-off-by: Allan McRae <allan@archlinux.org> [Ashley: rebased] Signed-off-by: Ashley Whetter <ashley@awhetter.co.uk>
2013-10-14makepkg: alphabetically order option variablesAllan McRae1-16/+16
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14makepkg: do not refer to src/ or pkg/Allan McRae1-4/+4
Use $srcdir and $pkgdir instead. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Add a -C, --cleanbuild option to clear the source directory before building ↵Lukáš Jirkovský2-2/+14
a package. Implements FS#17175. [Allan: Minor changes to output strings, fix removing of source directory] Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Link non-vcs sources into $srcdir during extractionAllan McRae1-11/+9
The separation between downloading and extracting for non-vsc sources was incomplete due to symlinks being made in $srcdir during the download stage. Have download_{local,file} just ensure the presence of the files in $startdir or $SRCDEST (downloading if needed) and then have extract_file symlink these files into $srcdir. Also replace "continue" with "return" in extract_file to make it clearer what is happening. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Ignore failure to patch during autogen.shAllan McRae1-1/+1
patch -N ignores the previously applied patch but still returns 1. This causes a git build with a reused source directory to fail. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Remove makepkg license checkAllan McRae1-13/+0
There is little reason for this field to be checked over all other fields. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Use $srcdir/ rather than src/ in makepkg helpAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Clarify --repackage descriptionAllan McRae1-2/+2
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Add make target for TESTSAndrew Gregory2-292/+294
This causes make to update TESTS when tests are added (or updated). For simplicity, this changes TESTS from a single multi-line list to individually appending each test file. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> [Allan: use C locale for sorting] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Display old and new version in pacman -Qu outputFlorian Pritz1-1/+8
This changes the output from "foo 1.0" to "foo 1.0 -> 1.1" which makes cronjobs that mail the -Qu output way more helpful. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-19TESTS: add missing testsAndrew Gregory1-0/+4
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-19Fix make distcheckAndrew Gregory2-2/+3
* set util binary paths relative to top_builddir * set pactest.py path relative to top_srcdir * include tap.py in check_SCRIPTS Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18makepkg: redirect downloader output to STDERRXyne1-1/+1
This allows scripts to safely capture the output of "makepkg -g". Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18makepkg: include all hash types in integlistXyne1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18bacman: optionally include unmodified backup files when availableXyne1-21/+59
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18bacman: update copyright information in version functionXyne1-0/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18bacman: pass unshifted arguments to fakerootXyne1-1/+3
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18dload: avoid renaming files downloaded via sync operationsChristian Hesse2-17/+22
If the server redirects from ${repo}.db to ${repo}.db.tar.gz pacman gets this wrong: It saves to new filename and fails when accessing ${repo}.db. We need the remote filename only when downloading remote files with pacman's -U operation. This introduces a new field 'trust_remote_name' to payload. If set pacman downloads to the filename given by the server. The field trust_remote_name is set in alpm_fetch_pkgurl(). Fixes FS#36791 ([pacman] downloads to wrong filename with redirect). [dave: remove redundant assignment leading to memory leak] Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18contrib: Unify quoting in error messagesAaron Lindsay3-7/+7
This fixes error messages to display the contents of variables rather than the variable name by replacing backticks with single quotes (m4 eats backticks). It also removes $"" localization from error messages to eliminate security holes. For instance, `rankmirrors nonexistent_file' will now display: 'nonexistent_file' does not exist. rather than: $1 does not exist. Signed-off-by: Aaron Lindsay <aaron@aclindsay.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18makepkg: use c-style for loops for integrity checksDave Reisner1-27/+24
These loops already maintain an independent loop counter, so cut out the middle man. While this change doesn't necessarily require that we drop support for sparse arrays, we do via this patch. A new lint check is added in check_sanity to abort when a sparse array is encountered. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18makepkg: always use read's -r flag with filenamesDave Reisner1-5/+5
These are all cases where we're reading filenames -- any backslashes are intentional and should not be interpreted. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18makepkg: inline creation of checksum indentingDave Reisner1-12/+7
With some simple math and printf formatting tokens, we can create the whitespace necessary for this without the need for a loop and string concatentation. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18makepkg: cleanup a few format string injectionsDave Reisner1-5/+5
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-04pactree: set full usage on DBs when registeringDave Reisner1-1/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-04pacman: add front end support for repo usage levelDave Reisner3-0/+85
Add a "Usage" key to the repo section of the config which allows for the tokens "Search", "Install", "Upgrade", "All", which correspond to values in the alpm_db_usage_t enum. Users can specify "Usage" multiple times for a given repo, or multiple flags per "Usage" line and they will be OR'd together. If unspecified, the default is full usage of the repo. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-04libalpm: introduce a usage level for reposDave Reisner9-4/+107
This defines a level of interest a user has in a repository. These are described by the bitmask flags in the alpm_db_usage_t enum: ALPM_DB_USAGE_SEARCH: repo is valid for searching ALPM_DB_USAGE_INSTALL: repo is valid for installs (e.g. -S pkg) ALPM_DB_USAGE_UPGRADE: repo is valid for sysupgrades ALPM_DB_USAGE_ALL: all of the above are valid Explicitly listing the contents of a repo will always be valid, and the repo will always be refreshed appropriately on sync operations. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-04proto: remove redundancy in cd for each functionDave Reisner2-7/+7
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-04pacman/util.c: use switch when there are fall through statementsSami Kerola1-8/+6
An 'if' clause with empty statement is allowed, but unusual construct. When 'if' is used this way the statement should at least have orphan semicolon ';'. For empty statements 'switch' feels like a native way express what is meant. Signed-off-by: Sami Kerola <kerolasa@iki.fi> [Allan] Keep comment Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-04Improve --help switch output for pacman utilsJason St. John6-28/+28
Unify the formatting of the --help switch for pacman utils, if it exists. All of the pacman utils will now output help text using the following format: util-name (pacman) v<pacman version> one line description of util's purpose Usage: util-name [options] -b, --bar whatever --bar does -f, --foo whatever --foo does -h, --help display this help message The --help switch does not exist for a couple of the utils, so the help/usage text for those will be displayed when the util is run with no arguments. Reported-by: Karol Błażewicz <karol.blazewicz at gmail.com> Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-04makepkg: add support for sha224 checksumsDave Reisner1-1/+1
Implements FS#36776. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-04makepkg: unify list of known hash algorithmsDave Reisner1-15/+16
Unifying this list makes adding new algorithms easier. There's also some menial cleanup in this patch to avoid use of eval and properly treat lists of data as array instead of simple strings. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-04libalpm: avoid name space conflictSami Kerola1-35/+35
The symbol 'err' refers to err() from err.h, and is wisest to be avoided as a variable name. Reference: http://man7.org/linux/man-pages/man3/err.3.html Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-04common: compare value rather than pointer addressSami Kerola1-1/+1
Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-04makepkg.8: fix typo in usageDave Reisner1-1/+1
Looks like I fat fingered something when I refactored the original submissions. Woops. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-04alpm: log errors for scriptlets terminated by a signalDave Reisner1-0/+9
Fixes FS#36618. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21Store fgetc output as an int.Allan McRae1-1/+3
Bug exposed on ARM when char is unsigned resulting in the comparison to EOF always failing. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21conflict.c: fix directory ownership checkAndrew Gregory3-4/+45
* append "/" to directories before searching package file lists * use lstat over stat so symlinks aren't resolved * fix the inverted check for stat's return value Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21doc/repo-add: Add note on when signatures are added to the dbOlivier Brunel1-0/+3
Signed-off-by: Olivier Brunel <i.am.jack.mail@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21makepkg: allow make-style environment var overridesDave Reisner2-1/+16
This allows for VAR=value and VAR+=value variable declarations. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21check.c: break backup file search loop after matchAndrew Gregory1-1/+1
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>