summaryrefslogtreecommitdiff
path: root/contrib
Commit message (Collapse)AuthorAge
* pacsearch: factored -Ss and -Qs parts into one single functionPierre Neidhardt2014-03-03
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: pattern arguments work as for pacmanPierre Neidhardt2014-03-03
| | | | | | | | | | | | | | | | | | | | Previously only one pattern was allowed. $ pacsearch foo bar Search for packages containing 'foo bar'. $ pacman -Ss foo bar Search for packages containing both 'foo' and 'bar'. Note that removing the quotes from the call was not enough since $ pacsearch 'foo|bar' would then fail. Note the use of '--' to indicate the end of option parsing. This way we ensure that input will always be valid and we need not input checks anymore. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: fields are treated uniformly when printingPierre Neidhardt2014-03-03
| | | | | | | | We include the leading space in the match for 'group' and 'installed'. This allows us to remove the conditions when printing. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: removed redundant sortingPierre Neidhardt2014-03-03
| | | | | | | | | | | Package are processed in the same order as pacman output, so there is no real need to sort. This makes the code simpler and faster. The only difference is that local packages will always be printed at the end. Previously, they were printed before multilib for instance. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: indexing by 'name version' instead of 'name'Pierre Neidhardt2014-03-03
| | | | | | | | | | | | | In the old pacsearch, packages were identified uniquely by pkgfields[1], which contained pkgname+pkgver. Since commit 4d13558 pkgver is stored in pkgfields[2], and packages have been identified with pkgfields[1] only. Because of that packages with a different version would appear once only. This fixes the regression by identifying packages with both pkgfields[1] and pkgfields[2]. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: removed useless commentPierre Neidhardt2014-03-03
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: CLI option to turn off colorsPierre Neidhardt2014-02-02
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: using pacman color themePierre Neidhardt2014-02-02
| | | | | | | | | | | | | No more per-repo coloring: this was not Arch-agnostic, and there is no reasonable, simple way to color repos in a consistant manner with only 6 colors. 'local' is in red: this way we benefit from the pacman -Ss && pacman -Qs combo. to_color subroutine: it takes an array instead of a string, this is faster and simpler. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: colors are portable (ANSI) and have natural variable namesPierre Neidhardt2014-02-02
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: Explicitly extract group informationPierre Neidhardt2014-02-02
| | | | | | | Also store pkgname and pkgver separately. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: localized outputPierre Neidhardt2014-02-02
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: more accurate help messagePierre Neidhardt2014-02-02
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: Copyright year bumpPierre Neidhardt2014-02-02
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove ts and sw from vim modeline when noet is setFlorian Pritz2014-01-28
| | | | | | | | | | | | 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>
* Update copyright years for 2014Allan McRae2014-01-06
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix misspellings and some grammar issues in output of some pacman contrib ↵Jason St. John2013-12-15
| | | | | | | | | | | | | scripts Affected files: -- contrib/bacman.sh.in -- contrib/paccache.sh.in -- contrib/pacdiff.sh.in -- contrib/rankmirrors.sh.in Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacdiff: do not remove pacfile after viewingVasiliy Korchagin2013-12-15
| | | | | | | Automatically removing the file after viewing is not good if on viewing you decide to deal with it later. Signed-off-by: Allan McRae <allan@archlinux.org>
* pacscripts: Improve error message when sudo binary is not foundJason St. John2013-12-15
| | | | | Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* paccache: clarify help outputAllan McRae2013-12-15
| | | | | | | The help output referred to variables in the script rather than what they were labelled in the parameter argument. Signed-off-by: Allan McRae <allan@archlinux.org>
* Improve --help switch output for pacman contrib and pacman scriptsJason St. John2013-11-15
| | | | | | | | | | | | | | | | | | | 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 Reported-by: Karol Błażewicz <karol.blazewicz at gmail.com> Signed-off-by: Jason St. John <jstjohn@purdue.edu>
* Fix whitespace and other formatting issuesJason St. John2013-11-15
| | | | | | | | | This commit: -- replaces space-based indents with tabs per the coding standards -- removes extraneous whitespace (e.g. extra spaces between function args) -- adds missing braces for a one-line if statement Signed-off-by: Jason St. John <jstjohn@purdue.edu>
* contrib/pacdiff: error if diffprog is not foundAllan McRae2013-10-15
| | | | | | FS#35936 Signed-off-by: Allan McRae <allan@archlinux.org>
* remove executable bit on paclog-pkglist.sh.inAndrew Gregory2013-10-14
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* bacman: optionally include unmodified backup files when availableXyne2013-09-18
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* bacman: update copyright information in version functionXyne2013-09-18
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* bacman: pass unshifted arguments to fakerootXyne2013-09-18
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* contrib: Unify quoting in error messagesAaron Lindsay2013-09-18
| | | | | | | | | | | | | | | 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>
* pacdiff: provide an --output option to show any .pac* filesJonathan Frazier2013-07-30
| | | | | | | | | This is an option to just echo's the pacnews/pacsaves instead of merging or removing them. This can be used to check the config status such as in a cron job without modifying the system. Signed-off-by: Jonathan Frazier <eyeswide@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacdiff: make pacmandb search the default type.Jonathan Frazier2013-07-30
| | | | | Signed-off-by: Jonathan Frazier <eyeswide@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacdiff: improve speed, accuracy finding active configs using pacmandbJonathan Frazier2013-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a new search type, using -p or --pacmandb options. It reads config file locations directly from the local pacman db. It will find active configs anywhere they are defined in installed packages. It is not dependant on outside configs such as updatedb.conf or scanning a large set of directories for find. This will find more pacnews than find when searching with the current default of /etc, and it is faster than both find and updatedb when searching the entire fs. When run directly after an update, the local db is more likely to be cached than all files in /etc or / as other methods read. This will increase performance further post upgrade. After a package is removed and a pacsave is created, this method will not find these pacsaves until the base config is added to the local db again. These files have no influence in a working system and only take up a few blocks of disk space. Active configs need to be dealt with immediately to keep a system working. pacsaves related to removed configs can remain for weeks or months without problems. I would recommend occasionally running other methods such as --locate to remove them. Signed-off-by: Jonathan Frazier <eyeswide@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacdiff: rework search type handling, add --find optionJonathan Frazier2013-07-30
| | | | | | | | | | Change cmd tests to if (( USE_FIND ))... as it is cleaner. All search cmds have an option and a variable initialized to zero. The active option should be set to 1. Add a switch to exclude multiple search options. set the default when all are equal to zero. Signed-off-by: Jonathan Frazier <eyeswide@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacdiff: add --nocolor option for the terminally challenged.Jonathan Frazier2013-07-30
| | | | | | | Allow colors to be disabled for use on broken/serial terminals. Signed-off-by: Jonathan Frazier <eyeswide@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacdiff: allow multiple separated optionsJonathan Frazier2013-07-30
| | | | | | | loop over arguments, this will allow adding options such as --nocolor Signed-off-by: Jonathan Frazier <eyeswide@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacdiff: clean up and reword --helpJonathan Frazier2013-07-30
| | | | | | | | Clean up and reword --help get rid of all the echos to make it easier to read in source. Signed-off-by: Jonathan Frazier <eyeswide@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacdiff: Search and give warnings for older pacsave.[0-9]* filesJonathan Frazier2013-07-30
| | | | | Signed-off-by: Jonathan Frazier <eyeswide@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacdiff: Add quit to found pacnew optionsJonathan Frazier2013-07-22
| | | | | Signed-off-by: Jonathan Frazier <eyeswide@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Merge branch 'maint'Allan McRae2013-06-18
|\
| * contrib: update .gitignoreAllan McRae2013-06-18
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * pacscripts: Update for pacman changesKarol Blazewicz2013-06-18
| | | | | | | | | | | | | | | | Changes to pacman mean that -Sp can be called without root permissions and '-d' needs passed twice to completely ignore dependencies. Signed-off-by: Karol Błażewicz <karol.blazewicz at gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
| * pacscripts: don't read the whole package from cacheKarol Blazewicz2013-06-18
| | | | | | | | | | | | | | | | | | | | '-q' means "Exit as soon as each specified pattern or filename has been matched." There is no reason to keep reading the whole package from the cache when the install script has already been printed to stdout. Signed-off-by: Karol Błażewicz <karol.blazewicz at gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
| * checkupdates: Consistency in environmental variable nameAllan McRae2013-06-18
| | | | | | | | | | | | | | Use CHECKUPDATES_DB rather than CHECKUPDATE_DB for consistency with the script name. Signed-off-by: Allan McRae <allan@archlinux.org>
| * contrib/checkupdates: fix typoAllan McRae2013-06-16
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | paccache: make --help output look nice on 80 width terminalAllan McRae2013-06-06
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Allan McRae2013-05-29
|\|
| * contrib: Remove harcoded /etc/pacman.confWilliam Giokas2013-05-18
| | | | | | | | | | Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
| * Revert "paccache: avoid subshell in calling runcmd"Dave Reisner2013-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | su is terribad. In addition to reverting, this also removes support for privilege escalation via su. If you want to use paccache as root and fail to comprehend how much better sudo is than su, then run paccache directly via su. Fixes FS#35173. This reverts commit 597286eb258f841dfc00f65474138fc6192f0092. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Allan McRae2013-05-07
|\|
| * paccache: avoid subshell in calling runcmdDave Reisner2013-04-12
| | | | | | | | | | | | | | | | | | Avoids problems with one of the worst CLI tools ever created, su. Fixes FS#34656. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
| * contrib/checkupdates: do not logAllan McRae2013-04-09
| | | | | | | | | | | | Avoid the log file filling up with "[PACMAN] synchronizing package lists". Signed-off-by: Allan McRae <allan@archlinux.org>
| * contrib: Use sysconfdir instead of /etcWilliam Giokas2013-04-09
| | | | | | | | | | | | | | Don't force people to see /etc. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>