1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-14 05:15:11 -05:00
Commit Graph

253 Commits

Author SHA1 Message Date
Jonathan Frazier
0f22bef8c3 pacdiff: provide an --output option to show any .pac* files
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>
2013-07-30 13:00:10 +10:00
Jonathan Frazier
2d9dad5e14 pacdiff: make pacmandb search the default type.
Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-07-30 13:00:10 +10:00
Jonathan Frazier
a79661225a pacdiff: improve speed, accuracy finding active configs using pacmandb
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>
2013-07-30 13:00:10 +10:00
Jonathan Frazier
15eea825e6 pacdiff: rework search type handling, add --find option
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>
2013-07-30 13:00:10 +10:00
Jonathan Frazier
b1b9ca01f0 pacdiff: add --nocolor option for the terminally challenged.
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>
2013-07-30 13:00:10 +10:00
Jonathan Frazier
05e954d2cd pacdiff: allow multiple separated options
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>
2013-07-30 13:00:10 +10:00
Jonathan Frazier
bcde027091 pacdiff: clean up and reword --help
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>
2013-07-30 13:00:10 +10:00
Jonathan Frazier
c4d8da4727 pacdiff: Search and give warnings for older pacsave.[0-9]* files
Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-07-30 13:00:10 +10:00
Jonathan Frazier
9108bfe080 pacdiff: Add quit to found pacnew options
Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-07-22 13:28:40 +10:00
Allan McRae
71328479f3 Merge branch 'maint' 2013-06-18 13:59:18 +10:00
Allan McRae
c81615f38c contrib: update .gitignore
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-18 13:27:31 +10:00
Karol Blazewicz
cd421c8383 pacscripts: Update for pacman changes
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>
2013-06-18 12:55:57 +10:00
Karol Blazewicz
85fde7038f pacscripts: don't read the whole package from cache
'-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>
2013-06-18 12:55:35 +10:00
Allan McRae
31d51052e1 checkupdates: Consistency in environmental variable name
Use CHECKUPDATES_DB rather than CHECKUPDATE_DB for consistency with the
script name.

Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-18 12:53:26 +10:00
Allan McRae
4283199039 contrib/checkupdates: fix typo
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-16 16:36:20 +10:00
Allan McRae
b7f8f5d26a paccache: make --help output look nice on 80 width terminal
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-06 13:47:32 +10:00
Allan McRae
84ac55b052 Merge branch 'maint' 2013-05-29 14:02:56 +10:00
William Giokas
090c4006d7 contrib: Remove harcoded /etc/pacman.conf
Signed-off-by: William Giokas <1007380@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-18 10:43:42 +10:00
Dave Reisner
8be08f7cae Revert "paccache: avoid subshell in calling runcmd"
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 597286eb25.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-18 10:43:16 +10:00
Allan McRae
0f988beff8 Merge branch 'maint' 2013-05-07 12:59:44 +10:00
Eric Bélanger
9de33488bf Add --noprepare option to makepkg
This new option disables the prepare function. Useful in combination
with -o to get an unpatched copy of the sources for testing purpose.

Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-04-30 21:04:21 +10:00
Dave Reisner
597286eb25 paccache: avoid subshell in calling runcmd
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>
2013-04-12 09:42:43 +10:00
Allan McRae
32c91e2895 contrib/checkupdates: do not log
Avoid the log file filling up with "[PACMAN] synchronizing package lists".

Signed-off-by: Allan McRae <allan@archlinux.org>
2013-04-09 11:52:32 +10:00
William Giokas
0f486adfec contrib: Use sysconfdir instead of /etc
Don't force people to see /etc.

Signed-off-by: William Giokas <1007380@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-04-09 11:51:45 +10:00
Daniel Wallace
f9280a0523 zsh completion: make sure -Ss works
if you put a type in pacman -Ss <regex> it doesn't work because it never
passes through they pointer ->sync_search to set $state.  All of the
other iterations like this have a case, add one for -S*s*

Signed-off-by: Allan McRae <allan@archlinux.org>
2013-04-06 13:16:05 +10:00
Kyle Keen
f797749c4e contrib: adding checkupdates
Signed-off-by: Kyle Keen <keenerd@gmail.com>

[Allan: update contrib/README]
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-26 15:55:51 +10:00
Allan McRae
bf3618a7c1 contrib: Update bash_completion
Check all options are included in bash-completion.  Alphabetize the
pacman_key options for easier maintenance.

Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-26 15:55:51 +10:00
Daniel Wallace
fb522face1 zsh_completion: remove sigfiles from package files completion
use setopt extendedglob to remove sigfiles from package completion

Signed-off-by: Daniel Wallace <danielwallace@gtmanfred.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-26 15:55:51 +10:00
Daniel Wallace
cd6ca88c49 zsh completion: make $tmp local
The tmp variable is conflicting with the $tmp variable in
${^fpath}/_main_complete(N) and which is used to complete all the
functions, and causing an error: command not found: for whatever was in
$tmp (which in this case is the last value in $words[@])

making it local fixes this.

Signed-off-by: Daniel Wallace <danielwallace@gtmanfred.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-26 15:55:51 +10:00
William Giokas
63f04177c3 zsh completion: Add new makepkg opts
Signed-off-by: William Giokas <1007380@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-14 11:47:10 +10:00
Allan McRae
b878157c78 fix distribution of contrib files
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10 11:33:59 +10:00
Daniel Wallace
41ef7eff75 zsh completion: add support for all longopts commands
add all the longopts for the operations and allow for them to be
completed just like shortopts

Signed-off-by: Daniel Wallace <danielwallace@gtmanfred.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10 09:07:00 +10:00
Daniel Wallace
0e5c22e7a1 zsh completion: include flags that can be doubled
include the flags that could be doubled up like -Sii -Syy -Suu -Qii etc
also include the long opts of all the commands

Signed-off-by: Daniel Wallace <danielwallace@gtmanfred.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10 09:07:00 +10:00
Daniel Wallace
0d4ecae625 zsh completion: fix doubling up of specific variables
-i -y -u -d -s etc, so that they do not disappear

In the future I hope there is an easy way to limit it to just 2, right
now the *- makes it so that it can be added as many times as you want.

Signed-off-by: Daniel Wallace <danielwallace@gtmanfred.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10 09:07:00 +10:00
Daniel Wallace
1b78e2bb1a zsh completion: add --color to completion
Signed-off-by: Daniel Wallace <danielwallace@gtmanfred.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10 09:07:00 +10:00
Daniel Wallace
8fd62a39b5 zsh completion: make sure all indentions are tabs
Signed-off-by: Daniel Wallace <danielwallace@gtmanfred.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10 09:07:00 +10:00
Daniel Wallace
704ab17a6a zsh completion: use consistent case statement style
Signed-off-by: Daniel Wallace <danielwallace@gtmanfred.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10 09:07:00 +10:00
Daniel Wallace
8db7e0c98d zsh completion: fix stacked completion
Before this, if you do pacman -Sy<tab> it completes to -y.  Now, with -S
and the other operations in the actual option _arguments, it won't
remove the operations.

Signed-off-by: Daniel Wallace <danielwallace@gtmanfred.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10 09:07:00 +10:00
Daniel Wallace
e43c271650 zsh completion: add deptest and database
Signed-off-by: Daniel Wallace <danielwallace@gtmanfred.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10 09:07:00 +10:00
Simon Gomizelj
06d761a020 make paclog-pkglist understand 'downgraded'
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10 09:01:56 +10:00
Allan McRae
9876d97839 bash_completion: update for color
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10 09:01:56 +10:00
William Giokas
d90641a894 contrib: Add color to paccache
Signed-off-by: William Giokas <1007380@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-08 17:04:40 +10:00
William Giokas
6e0c47d22f contrib: Add color to bacman
Signed-off-by: William Giokas <1007380@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-08 17:04:40 +10:00
William Giokas
f8ed8620d0 contrib: Make pacdiff colors the same as makepkg
Added an `ask` message function that emulates pacman's appearance.

Signed-off-by: William Giokas <1007380@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-08 17:04:40 +10:00
Dave Reisner
972528c021 paccache: use xargs to execute mv/rm commands
This removes the restriction on the length of the command line, as xargs
will work around by running multiple instances of the command for us.

As seen: https://bbs.archlinux.org/viewtopic.php?pid=1232959

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-24 13:11:54 +10:00
Andrew Gregory
529cf928ab add missing utilities to contrib/README
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-07 10:48:11 +10:00
Andrew Gregory
6617182229 unset executable bit on updpkgsums.sh.in
No other contrib script is executable.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-07 10:48:11 +10:00
Andrew Gregory
24a78fe731 paclog-pkglist: parse entries with caller info
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28 23:38:46 +10:00
William Giokas
457642231e Fix printing of paths
Originally printed a leading \ before all path names as the `' would be
removed during the make. Using '' should be just as good as using `'.

paccache.sh.in:
die "cachedir \`%s' does not exist or is not a directory" "$cachedir"

paccache
die "cachedir \%s does not exist or is not a directory" "$cachedir"

Signed-off-by: William Giokas <1007380@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28 23:38:46 +10:00
Dave Reisner
250aaefb27 paccache: pass the --file option to pacsort
Resolves FS#33455.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28 23:38:46 +10:00