summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* pmrule.py: add FILE_CONTENTS ruleAndrew Gregory2015-11-28
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* lint_pkgbuild/variable: increase robustnessAllan McRae2015-11-23
| | | | | | | | | Approach the detection of variables of the wrong type using an approach similar to that used for construction of .SRCINFO files. While doing silly things in bash could still result in false negatives, this approach should be very robust to generatinf false positives results. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: merge arch dependent variables after PKGBUILD lintingAllan McRae2015-11-23
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: remove obsolete commentAllan McRae2015-11-23
| | | | | | Behaviour changed in commit dce82f9d. Signed-off-by: Allan McRae <allan@archlinux.org>
* lint_pkgbuild: explicitly return valueAllan McRae2015-11-23
| | | | | | Set the return value to be local and always explictly returns it. Signed-off-by: Allan McRae <allan@archlinux.org>
* Refactor strtrim functionSilvan Jegen2015-11-11
| | | | | Signed-off-by: Silvan Jegen <s.jegen@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Use correct format specifiersRikard Falkeborn2015-11-11
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Refactor lint_source to work with earlier versions of BashAaron Campbell2015-11-05
| | | | | | | | | | | Negative subscripts to indexed arrays are not supported before 4.2. However, since substring expansion works on arrays, we can specify an offset of -1 to be taken relative to one greater than the maximum index of the specified array (see Parameter Expansion section of the bash man page). This works with both Bash 4.1 and 4.2, and 4.1 is already the oldest supported by pacman. Signed-off-by: Aaron Campbell <aaron@monkey.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* files_search: reset found for each targetAndrew Gregory2015-11-04
| | | | | | | | Otherwise any invalid targets following a successful match will not get an error message. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* files_search: free compiled regexAndrew Gregory2015-11-04
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* files: do not unnecessarily strdup targetsAndrew Gregory2015-11-04
| | | | | | | Targets are never modified so we can just use the original copy. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* files.c: add vim modelineAndrew Gregory2015-11-04
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* add detail to broken dependency errorsAndrew Gregory2015-11-04
| | | | | | | | | The difference between a sync target having an unmet dependency and breaking a dependency for an installed package is a common source of confusion. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* add --quiet to -FhAndrew Gregory2015-11-04
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* ensure realloc has a positive sizeAndrew Gregory2015-11-03
| | | | | | | | If given size 0 POSIX allows realloc to return a pointer that is not suitable for use. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* zsh_completion: Handle --ignore/--ignoregroup correctlyMohammad Alsaleh2015-11-03
| | | | | | | Completion now works as expected with a comma-separated sequence. Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* package.c: Fix incorrect buffersize and constant-foldingPierre Neidhardt2015-11-03
| | | | | | Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Add -F --machinereadable optionFlorian Pritz2015-11-03
| | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
* Document pacman -FFlorian Pritz2015-11-03
| | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
* scripts/po: fix translated file nameAllan McRae2015-10-28
| | | | | | | This file was renamed during review and its entry in POTFILES.in was not updated. Signed-off-by: Allan McRae <allan@archlinux.org>
* _alpm_hook_run: check path length before copyingAndrew Gregory2015-10-28
| | | | | | | | | If a hook path equals or exceeds PATH_MAX characters the path will be left unterminated. Pre-calculating the path length also allows us to use the more efficient memcpy over strncpy. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix $pkgname element duplicationBenjamin Yates2015-10-28
| | | | | | | | | | | | run_split_packaging did not preserve the $pkgname array correctly, and would create duplicate entries in the list during restore. After restoring the backup (a b c) would become (a b c b c). This probably went unnoticed because during --install, pacman would reconcile the duplicates. Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: fix pkgver checkingAllan McRae2015-10-27
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* add alpm-hooks man pageAndrew Gregory2015-10-27
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* hook.c: print invalid option nameAndrew Gregory2015-10-27
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* order hooks by file nameAndrew Gregory2015-10-27
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Align titles automatically in information displayPierre Neidhardt2015-10-27
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Alpm, check for NULL in free-functionsRikard Falkeborn2015-10-27
| | | | | | | | Also, use FREE() instead of free() in _alpm_backup_free() to set the pointers to NULL. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* zsh_completion: Add --asdeps/--asexplicit to -U optionsMohammad Alsaleh2015-10-27
| | | | | Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Use ARRAYSIZE macro for non-string array size computationPierre Neidhardt2015-10-27
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Fix hard-coded debug suffixMohammad Alsaleh2015-10-22
| | | | | Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsort: clean up if errorRikard Falkeborn2015-10-21
| | | | | | | | * free memory * close open file Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsort: don't overwrite memory if realloc failsRikard Falkeborn2015-10-21
| | | | | | | That makes it impossible to free it later. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsort: handle failing list_addRikard Falkeborn2015-10-21
| | | | | | | | | Since it can fail, check the return value. If it fails, we need to free the memory of the object we wanted to add to the list. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* HACKING: Allow the use of 'sizeof' on valuesPierre Neidhardt2015-10-21
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Set CCACHE_BASEDIR to make paths in $srcdir relativeJan Alexander Steffens (heftig)2015-10-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Correctly layer distcc and ccacheJan Alexander Steffens (heftig)2015-10-19
| | | | | | | | | ccache expects further compiler wrappers to be specified via CCACHE_PREFIX. Otherwise, ccache will hash the wrapper executable instead of the real one. Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: Add check_buildoption for distcc and ccacheJan Alexander Steffens (heftig)2015-10-19
| | | | | | | | | | | makepkg used to check OPTIONS too, which could override BUILDENV. Implement a new function that handles these options more like OPTIONS. This also reduces code duplication a bit. Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: separate "sourcefile" into two wordsAllan McRae2015-10-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove space before ellipsesAllan McRae2015-10-19
| | | | | | Makes all use of ellipses consistent... Signed-off-by: Allan McRae <allan@archlinux.org>
* Pluralize malloc failure stringAllan McRae2015-10-19
| | | | | | | Not particularly useful in English (will always be plural), but useful in languages that have multiple plural forms. Signed-off-by: Allan McRae <allan@archlinux.org>
* Ignore cov-int directory for Coverity scanAllan McRae2015-10-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* contrib/checkupdates: separate fakeroot call and commandAllan McRae2015-10-18
| | | | | | | Separating the fakeroot command and the pacman call with "--" prevents weird interactions with some locales. See FS#46405. Signed-off-by: Allan McRae <allan@archlinux.org>
* package.c: Comment stylePierre Neidhardt2015-10-18
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Do not print any root prefix in files database operationsAllan McRae2015-10-18
| | | | | | | | Combining with the --root flag and outputing a consistent root prefix leads to many situations that make no sense. Instead, do not print any prefix for any --files operations. Signed-off-by: Allan McRae <allan@archlinux.org>
* package.c: Remove obsolete param from docPierre Neidhardt2015-10-18
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* add hook testsAndrew Gregory2015-10-18
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* pactest: add hook/script supportAndrew Gregory2015-10-18
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* util.py: return the created pathAndrew Gregory2015-10-18
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pactest: use pacman --hookdir optionAndrew Gregory2015-10-18
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>