1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-04 16:45:07 -05:00
Commit Graph

19 Commits

Author SHA1 Message Date
Andres P
80f7c1707c bash_completion : full rewrite with many improvements
* Undeclared local vars with common enough names to warrant breakage
* Performance issues with _pacman trying to replicate /usr/bin/pacman
  with find and other slow tools.
* Performance issues with expanding an array (with sometimes hundreds of
  items) over three times.
* Expanding said array to remove already completed entries had the side
  effect of braking filenames with spaces and or \n.
* add -D --database options and --print
* fix dirs showing up when they shouldn't in completions
* completions regarding database entries shouldn't trigger filename
  completion.

This is now down to 106 lines. The original one (master) is 365 lines
long, yet this one retains all functionality.

The work is documented in FS#16630.

Signed-off-by: Andres P <stderr@mail.com>
Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-24 21:24:48 -05:00
Xavier Chantry
d39b1dbe62 Add new --print operation for all operations
And a new --print-format option to configure the output.

This implements FS#14208

Example usage :
pacman -Sp --print-format "%r/%n-%v : %l [%s]" kdelibs
extra/kdelibs-4.3.2-4 : ftp://mir2.archlinuxfr.org/archlinux/extra/os/i686/kdelibs-4.3.2-4-i686.pkg.tar.gz [0,00]

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-14 18:44:40 -05:00
Cedric Staniewski
1a00ee5c27 bash_completion: remove absolute utility paths again
The location of the used utilities may and does differ between various
distributions and therefore absolute paths do not work well. Since the
main purpose of its introduction was to avoid side-effects caused by
aliases, it is sufficient to disable possible aliases temporarily by
preceding the commands with a backslash.

Signed-off-by: Cedric Staniewski <cedric@gmx.ca>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-28 23:19:03 -06:00
Pierre Schmitz
d85421ec62 contrib/*_completion: match *.pkg.tar.*
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-28 23:17:54 -06:00
Dan McGee
03f35b1432 bash_completion: use absolute paths to utilities
Fixes issues noted in FS#16630.

Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-30 23:01:12 -06:00
Dan McGee
ca6ef852f9 New feature: files verification
This implements FS#13877. Add a new option "-Qk" which checks if all of the
files for a given package (or packages) are really on the system (i.e. not
accidentally deleted). This can be combined with filters and other display
options. It also respects both the --quiet and --verbose flags to give
varying levels of output.

Based on the original patch by Charly Coste <changaco@laposte.net>, thanks
for your work!

Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-22 20:13:53 -05:00
Chantry Xavier
5af076f09f Kill the dependsonly option.
From the man page :
"This is pretty useless and we're not sure why it even exists."

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-03-22 18:39:15 +01:00
Chantry Xavier
73ab153c44 Kill some obsolete references to -A option.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-03-17 21:00:09 -05:00
Nagy Gabor
e63366ae5e New remove option : -u / --unneeded (FS#6505).
With --unneeded option 'pacman -R' doesn't stop in case of dependency error;
it removes the needed-dependency targets from the target-list instead.  See
also: http://archlinux.org/pipermail/pacman-dev/2007-October/009653.html .

The patch also adds a new causingpkg field to pmdepmissing_t which indicates
the to-be-removed package which would cause a dependency break. This is
needed, because miss->depend.name may be a provision. miss->causingpkg will
be useful in -R dependency error messages too.

[Xavier: renamed inducer to causingpkg, removed the _alpm_pkgname_pkg_cmp
helper function as requested by Aaron. This might be added by a further
commit.  Other small cleanups, updated manpage and bash completion.]

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-06 08:46:15 +01:00
Nagy Gabor
2a7101c049 New --asexplicit option
This is the symmetric of --asdeps, install packages explicitly.
Documentation and completion files were updated accordingly.
Added sync301.py and upgrade032.py pactest files to test this.

I also made a little modification in ALLDEPS handling too.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-01-21 19:39:26 -06:00
Chantry Xavier
aec7c13648 Rename -t --orphans to -t --unrequired (FS#9144).
It turns out the orphan name was misleading. Real orphans are packages
installed as dependency no longer required by any others (-Qtd).
The -t option only shows package not required by any others, so --unrequired
describes it better.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-10 22:58:19 -06:00
Dan McGee
aa2d0d7114 Add --ignoregroup to completion files
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02 13:11:39 -06:00
Chantry Xavier
250331a636 Add new --needed option for -S.
During a pacman operation such as a group install, pacman can ask several
questions such as "local version is up to date. Upgrade anyway?". They are
usually all answered either by yes or by no:
* yes when you want to reinstall all the targets.
* no when you only want to install the missing ones (either because you are
installing a group, or because you are copying a pacman -S line from wiki or
whatever).

So instead of asking this question for each target, it is now now configured
with a flag.  Yes will be the default -S behavior, No will be achieved with
the --needed flag.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-02 11:14:13 -06:00
Dan McGee
f5d2150e9d Remove -F/--freshen operation
This operation made sense in the days before sync DBs existed, but it no
longer has the same usefulness it once did.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-11-21 11:51:17 -06:00
Dan McGee
84433c8800 Update bash completion
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-11 09:51:09 -06:00
Chantry Xavier
3987137505 contrib : update zsh and bash completion to reflect the new sync dbs location.
I wonder how many tools / scripts deal directly with the sync databases under /var/lib/pacman/ ,
I doubt these are the only ones.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-09-05 20:28:46 -05:00
Dan McGee
520841ee8a Quick updates to the bash completion script
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-17 13:20:17 -04:00
Dan McGee
bd6adec40b * Updated bash_completion script to 3.0 options.
* Changed that removal message again, hopefully it sounds good now.
* Shortened a usage option description so it would not wrap at 81 chars.
2007-02-19 04:13:13 +00:00
Aaron Griffin
a1f36454c2 Added a 'contrib' directory for other stuff that might be a good idea to maintain here.
* moved bash_completion from the "archlinux" script in the official bash_completion package
* moved zsh_completion from the AUR zsh-pacman package
2007-02-16 19:37:00 +00:00