summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-10-31makepkg.8: Document remaining environmental variablesAllan McRae1-1/+17
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-31makepkg.8: document environmental variables that affect gpg signingAllan McRae1-0/+7
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-31Fix detection of joint --native and --foreign usageAllan McRae1-1/+2
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-31List signiture keyids in -Sii outputAllan McRae1-2/+13
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-31Make functions to decode a signature and extract keyid publicAllan McRae5-11/+12
These are useful for frontends. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-15makepkg: validate updated pkgver before replacementDave Reisner1-7/+18
Validate the new pkgver efore blindly ramming it into the PKGBUILD. This gives us good feedback and prevents corrupting the PKGBUILD, e.g. ==> Starting pkgver()... ==> ERROR: pkgver is not allowed to contain colons, hyphens or whitespace. ==> ERROR: pkgver() generated an invalid version: a horse is not a pkgver As an additional failsafe, exchange a valid for invalid character as command separator in @SEDINPLACE@ expressions. For even more paranoia, exit if sed fails for any reason. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-15Ensure packages have a valid versionAllan McRae1-0/+4
Currently you can manually create and then install a package with a version not containing a pkgrel. The created local database entry is invalid as the directory name can not be split by _alpm_splitname due to the assumtion of hyphens separating name-pkgver-pkgrel. Ensure the package has a valid version when it is loaded. Fixes FS#35514. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-15makepkg: use source_safe when resourcing BUILDFILEAllan McRae1-1/+1
After updating the pkgver, we still need to safely source the BUILDFILE. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-15contrib/pacdiff: error if diffprog is not foundAllan McRae1-0/+5
FS#35936 Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-15proto: remove missed $srcdir redundanciesAllan McRae2-2/+2
Most of the redundant "cd $srcdir" in the prototypes were removed in commit 5f80d7af. Fix the rest. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-15Fix progress bar overflow while checking package integrityAllan McRae1-3/+5
On 32bit systems, the progress bar intergrity checking can show values greater than 100% with large transactions. This is due to the total size of all package files being greater than a size_t. Use uint64_t for these sizes. Fixes FS#36608 Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-15Added list of mandatory options to PKGBUILD's man pageEric Toombs1-1/+3
[Allan: Adjust wording due to remove al license warning] Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-15autogen.sh: remove useless shell flag and subshellsDave Reisner1-2/+4
$ ./autogen.sh ./autogen.sh: 3: ./autogen.sh: BASH_SOURCE: parameter not set The -u flag causes this (and lots of other mysterious problems). Since there aren't even any variables in this script, it makes no sense to use it. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-15Report which package is missing a signatureAllan McRae1-1/+4
If any package in a sync transaction is missing a required signature, we give an uninformative error message (which may or may not state that the missing signature is the issue). Always output the package with the missing signature. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14libalpm: move function pointer conditionslavomir vlcek1-4/+6
Function pointer gets uselessly compared for NULL in every iteration. Move the condition to do it just once. Signed-off-by: slavomir vlcek <svlc@inventati.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Add parens around tuples in Python list comprehensions.Jeremy Heiner34-34/+34
Reported by 2to3: optional in Python 2, but required in 3. Signed-off-by: Jeremy Heiner <ScalaProtractor@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Use Python's "range" instead of deprecated "xrange".Jeremy Heiner3-5/+5
Reported by 2to3. Python 3 throws out the old range, renames the old xrange to be the new range, leaving no xrange. A shim could be used, but using the less efficient version does not have a noticeable impact on the run time. This observed (lack of an) effect is as described in the Python 2 docs for xrange. The largest range created is only 1000 elements big, and the memory cost of those ranges is negligible when compared to that of all the pmpkg instances created. Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Use dict iteration methods common to both Python 2 and 3.Jeremy Heiner4-9/+9
The .items, .keys, and .values methods in Python 2 make copies, so the test framework uses the .iter* flavors of those methods. But in Python 3 those .iter* (and even the 2.7 .view*) flavors are removed and the original methods return views. Measurements were taken under Python2 to see what impact the copying had, and there was none. Thus it is not worth the effort to avoid. Reported as a compatibility issue by 2to3. Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Use Python's "0o#" octal literal instead of deprecated "0#".Jeremy Heiner3-5/+5
Reported as a compatibility issue by 2to3. Signed-off-by: Jeremy Heiner <ScalaProtractor@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Use "exec" instead of "execfile" (deprecated in Python 3).Jeremy Heiner1-1/+2
This was the only compatibility issue reported by "python2 -3". Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Bail early with a clear error message if Python runtime isn't 2.7+.Jeremy Heiner2-1/+7
Prior to this a test that used a feature too new for the runtime would blow up when it was "exec"d (possibly in the middle of a run of a bunch of tests) with an error message that was not very helpful. Remove Python 2.5 and 2.6 runtimes from the list configure searches. 2.5 suffers the problem described above. The code currently will run on 2.6 but, as was noted on the dev list, that runtime is at the end of its life, so 2.7 is a better cutoff. Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14include invalid options in error messagesAndrew Gregory2-2/+8
On invalid combinations of flags we were only printing the unhelpfully vague message "invalid option". Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14pacman: die on invalid option combinationsAndrew Gregory1-0/+140
Fixes FS#20950 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14rename PKG_LOCALITY_LOCAL -> PKG_LOCALITY_NATIVEAndrew Gregory3-5/+5
PKG_LOCALITY_LOCAL was confusing because the enum is used with -Q, so all packages are "local". Also reversed the config->op_q_locality assignment so that the locality matches the option used. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
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>