summaryrefslogtreecommitdiff
path: root/contrib
Commit message (Collapse)AuthorAge
* contrib/paclist: Add "--help" command line parameterLukas Fleischer2011-12-05
| | | | | | | | Be consistent with all other contrib scripts and support the "--help" command line switch. Fixes FS#27258. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
* paccache: add vim modelineDave Reisner2011-10-26
| | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* paccache: ensure seen/seenarch vars are setDave Reisner2011-10-26
| | | | | | | | Doesn't do a whole lot of good to compare against values that are never set. Fixes bug where -vvv output wasn't grouping packages together properly. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* bacman: pkgrel does not have to be an integerlolilolicon2011-10-21
| | | | | | | pkgrel, as with pkgver, simply mustn't contain hyphens. Signed-off-by: lolilolicon <lolilolicon@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* PKGBUILD.vim: fix epoch syntax highlightinglolilolicon2011-10-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* bacman: use globbing to get local package db pathlolilolicon2011-10-06
| | | | | | | | | | | | | | | | | | | | The original code- pkg_dir="$(echo $pac_db/$pkg_name-[0-9]*)" is problematic in several ways: - $pac_db and $pkg_name should be quoted, obviously. - It assumes pkgver always starts with an integer, while in fact it just can't contain ':' and '-'. Counterexample: the code breaks on lshw B.02.15-1. - It assumes there are no more than one directory matching the pattern. While this should be the case if everything works perfectly, it certainly relies on external conditions. Counterexample: if the local db contains two packages named foo and foo-3g, even if everything else is perfect, the code will match two directories. Don't make assumptions, use what is known. Signed-off-by: lolilolicon <lolilolicon@gmail.com>
* bacman: add tar.Z package creation supportlolilolicon2011-10-06
| | | | | | | bacman should support whatever makepkg does as PKGEXT. Also remove obsolete $EXT variable. Signed-off-by: lolilolicon <lolilolicon@gmail.com>
* bacman: small code cleanuplolilolicon2011-10-06
| | | | | | | | | | This includes: - Quoting fixes. - Drop deprecated mktemp option -p. - Set extglob nullglob shell options at the top. - Use extended globbing instead of regex to match %HEADER% in pacman db. Signed-off-by: lolilolicon <lolilolicon@gmail.com>
* bacman: bashify using [[ ]] and (( ))lolilolicon2011-10-06
| | | | | | | Another style change. The [[ expression ]] form is particularly cleaner, safer and more powerful than the [ expression ] form. Signed-off-by: lolilolicon <lolilolicon@gmail.com>
* bacman: indent code using TABlolilolicon2011-10-06
| | | | | | | As every piece of code in the whole project uses TAB as indentation character, bacman shouldn't be an exception. Signed-off-by: lolilolicon <lolilolicon@gmail.com>
* paccache: proper quoting in [[ expression ]]lolilolicon2011-09-30
| | | | | | | | Always quote the right-hand side of expression when the == or != operator is used, unless intended as a pattern. Signed-off-by: lolilolicon <lolilolicon@gmail.com> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* paccache: declare variables explicitlylolilolicon2011-09-30
| | | | | | | | Declare and initialize integer variables 'needsroot' and 'verbose'. Don't use the fact that (( undefined_variable )) evaluates to 0. Signed-off-by: lolilolicon <lolilolicon@gmail.com> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* paccache: allow strictly integer for -k optionlolilolicon2011-09-29
| | | | | | | | | | | | | | Verify the argument to -k is a non-negative integer. Leading zeros are simply stripped. 'declare -i keep' allowed the argument to -k to be any arithmetic evaluation expression. The simple assignment 'keep=$OPTARG' triggers arithmetic evaluation implicitly, which can either consume a huge amount of resources with input such as '2**2**32' or immediately produce an error on invalid input. Instead, we simply 'declare -- keep' and avoid all that. Signed-off-by: lolilolicon <lolilolicon@gmail.com> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* bash_completion: add completion for pacman-keyDave Reisner2011-09-26
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* paccache: remove unnecessary if checkDave Reisner2011-09-18
| | | | | | | This is superfluous as the ensuing for loop will exit immediately on the same condition avoided by the if. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* paccache: escape . in trimming of diskspace stringDave Reisner2011-09-11
| | | | | | | | | | Before: ==> finished dry run: 2 candidates (diskspace saved: 7. MiB) After: ==> finished dry run: 2 candidates (diskspace saved: 7.8 MiB) Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* bash_completion: add dbonly to sync optionsDave Reisner2011-08-19
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Add makepkg -S which is an alias to makepkg --sourceSebastien Luttringer2011-08-18
| | | | | | | | makepkg --source is a often used go make source package like for AUR. Have a -S shortcut will save the world. Signed-off-by: Sebastien Luttringer <seblu@seblu.net> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix trailing whitespace in whole codebaseDan McGee2011-08-17
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* build-sys: always use $(RM) instead of rm -fDave Reisner2011-08-15
| | | | | | | These are equivalent. Use the autoconf macro for consistency. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Attempt to update zsh_completionDan McGee2011-08-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* bash_completion: update for adjusted optionsDave Reisner2011-08-11
| | | | | | | | Remove -k option excepting query operations and add --recursive for sync and upgrade operations. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* paccache: use pacsort instead of sort -VDave Reisner2011-08-08
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib/paccache: misc cleanup and bugfixDave Reisner2011-08-08
| | | | | | | | | | * change error verbiage when run as root * delete sigs along with packages * fix bug in diskspace calculations * merge END block in pkgfilter Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* paccache: add new contrib scriptDave Reisner2011-08-02
| | | | | | | | | | paccache is a robust and flexible package cache cleaner with a variety of options. Much credit goes to DJ Mills and Pat Brisbin for ideas behind this script. Signed-off-by: Dave Reisner <dreisner@archlinux.org> [Dan: add .gitignore entry] Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib/pacsearch: skip non-matching linesDan McGee2011-07-27
| | | | | | | This prevents some perl errors from popping up when pacman prints error or warning messages. Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib: add paclog-pkglist to gitignoreDan McGee2011-07-21
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* PKGBUILD.vim: add new var and assert bash syntaxDave Reisner2011-07-18
| | | | | | | * assert is_bash to pickup more valid syntax * add checkdepends highlighting Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* contrib/paclog-pkglist: whitespace cleanupDave Reisner2011-07-18
| | | | | | | add a modeline and change 2 space indent to a tab. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib/paclog-pkglist: rework as bash wrapping awkDave Reisner2011-07-18
| | | | | | | | | | Avoid some pain in awk's limited handling of command line arguments by wrapping this in a Bash script. We also default to @localstatedir@/log/pacman.log when no args are specified, meaning that -h or --help is required to get the help message. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib/paclog-pkglist: new contributionDave Reisner2011-07-14
| | | | | | | | converts a pacman log file to a list of installed packages, which should match the output of `pacman -Q'. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib/bash_completion: update with new makepkg optsDave Reisner2011-07-14
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: remove unused -C option from option listDave Reisner2011-07-14
| | | | | | | We nuke it from the completion file as well along with its longopt. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib/paclist: rewrite in bashDave Reisner2011-07-05
| | | | | | | | | | | | | The original concept for this script was a bash implementation, but turned out to be unreasonable at the time due to the efficiencies of the database format. Since those have been resolved, we can rewrite this in bash as a much simpler script. All the action happens in a single line, but we add extend this a little, binding to gettext to keep our pacman translations intact. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* fix vim syntax highlighting of .sh filesFlorian Pritz2011-06-30
| | | | | | | | | | vim recognises what type of shell script it's dealing with by looking at the shebang. If detection fails it falls back to sh which doesn't support some bash features. Adding a normal, possibly broken, shebang which gets fixed by the Makefile allows vim to detect bash syntax. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2011-04-15
|\ | | | | | | | | | | | | | | Conflicts: lib/libalpm/alpm.h lib/libalpm/trans.c Signed-off-by: Dan McGee <dan@archlinux.org>
| * bacman: fix the fact that the depends file no longer existsDan McGee2011-04-09
| | | | | | | | | | | | Addresses FS#23641. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Rely on the return value of type instead of its outputDave Reisner2011-03-27
| | | | | | | | | | Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-03-21
|\| | | | | | | | | | | | | | | Conflicts due to change in return calling style. Conflicts: src/pacman/pacman.c src/pacman/sync.c
| * Some more zsh completion tidy upAllan McRae2011-03-21
| | | | | | | | | | | | | | Changes for consistency across functions Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Fix zsh completionAllan McRae2011-03-21
| | | | | | | | | | | | | | | | Fixes completion for "pacman -S <tab>" and "pacman -S repo/<tab>" Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
* | remove antiquated contrib/wget-xdelta.shDave Reisner2011-03-17
|/ | | | | | | | Support for this script was removed in makepkg by commit b4e1365. Delta creation support has been provided by scripts/pkgdelta. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib/Makefile.am: don't simplify what you don't understandDan McGee2011-03-16
| | | | | | | | This was totally screwed under a 'make distcheck' invocation. Bring it inline with what we have (and what works!) in scripts/Makefile.am. This was broken/introduced in commit 05f0a28932. Signed-off-by: Dan McGee <dan@archlinux.org>
* pkgsearch: handle non-matching lines gracefullyDan McGee2011-01-24
| | | | | | | | | Before any non-matching line would trigger some perl warnings about undefined variables. If a line doesn't match, just show it to the user unprocessed; this is seen with warning and error messages pacman not so helpfully emits on stdout rather than stderr. Signed-off-by: Dan McGee <dan@archlinux.org>
* Update contrib/ MakefileDan McGee2011-01-24
| | | | | | | | We didn't have the proper dependencies specified for our scripts after the move to *.in extensions, so a change to a file didn't trigger a rebuild. Also remove old stuff from .gitignore. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove epoch as an independent fieldDan McGee2011-01-21
| | | | | | | | | | | | | | Instead, go the same route we have always taken with version-release in libalpm and treat it all as one piece of information. Makepkg is the only script that knows about epoch as a distinct value; from there on out we will parse out the components as necessary. This makes the code a lot simpler as far as epoch handling goes. The downside here is that we are tossing some compatibility to the wind; packages using force will have to be rebuilt with an incremented epoch to keep their special status. Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: add option to clear buildflagsAllan McRae2010-12-29
| | | | | | | | | | Add the "buildflags" option, which is useful in its negative form for disabling CFLAGS, CXXFLAGS and LDFLAGS when building a package. This is useful when determining of one of these flags is causing an issue with a package. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib: remove bash pactreeXavier Chantry2010-12-12
| | | | | | This has been rewitten in C which is much much faster. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
* Merge branch 'maint'Dan McGee2010-12-12
|\ | | | | | | | | | | Conflicts: lib/libalpm/be_local.c lib/libalpm/trans.c
| * PKGBUILD.vim: add special licenses BSD MIT ZLIB PythonXavier Chantry2010-10-28
| | | | | | | | | | Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>