Commit Graph

130 Commits

Author SHA1 Message Date
Dave Reisner 82ffe2cbfd build-sys: always use $(RM) instead of rm -f
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>
2011-08-15 13:05:27 -05:00
Dan McGee d0c64c4196 Attempt to update zsh_completion
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-11 11:29:49 -05:00
Dave Reisner 0bfefa87c8 bash_completion: update for adjusted options
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>
2011-08-11 11:29:49 -05:00
Dave Reisner 5136df0f39 paccache: use pacsort instead of sort -V
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-08 16:49:56 -05:00
Dave Reisner 1e16b94a85 contrib/paccache: misc cleanup and bugfix
* 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>
2011-08-08 13:29:45 -05:00
Dave Reisner 6997a738bb paccache: add new contrib script
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>
2011-08-02 08:24:06 -04:00
Dan McGee 06974ebf2f contrib/pacsearch: skip non-matching lines
This prevents some perl errors from popping up when pacman prints error
or warning messages.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-27 12:44:17 -05:00
Dan McGee 058ee17371 contrib: add paclog-pkglist to gitignore
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-21 15:03:33 -05:00
Dave Reisner d86a60c694 PKGBUILD.vim: add new var and assert bash syntax
* assert is_bash to pickup more valid syntax
* add checkdepends highlighting

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-18 11:50:47 -04:00
Dave Reisner 3934a842b8 contrib/paclog-pkglist: whitespace cleanup
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>
2011-07-18 10:35:12 -05:00
Dave Reisner 3294039a00 contrib/paclog-pkglist: rework as bash wrapping awk
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>
2011-07-18 10:34:56 -05:00
Dave Reisner 0fe93bc34c contrib/paclog-pkglist: new contribution
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>
2011-07-14 15:49:34 -05:00
Dave Reisner 1376ba5b0e contrib/bash_completion: update with new makepkg opts
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-14 15:49:21 -05:00
Dave Reisner 6907a22b27 makepkg: remove unused -C option from option list
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>
2011-07-14 15:49:13 -05:00
Dave Reisner 62880d7568 contrib/paclist: rewrite in bash
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>
2011-07-05 21:37:18 -05:00
Florian Pritz 9efd10cd2a fix vim syntax highlighting of .sh files
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>
2011-06-30 10:44:45 -05:00
Dan McGee efd8ae483f Merge branch 'maint'
Conflicts:
	lib/libalpm/alpm.h
	lib/libalpm/trans.c

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-15 18:41:49 -05:00
Dan McGee 31cb210057 bacman: fix the fact that the depends file no longer exists
Addresses FS#23641.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-09 17:26:55 -05:00
Dave Reisner c02556e290 Rely on the return value of type instead of its output
Signed-off-by: Dave Reisner <d@falconindy.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-27 20:15:20 -05:00
Dan McGee 0ff52b6845 Merge branch 'maint'
Conflicts due to change in return calling style.

Conflicts:
	src/pacman/pacman.c
	src/pacman/sync.c
2011-03-21 07:53:13 -05:00
Allan McRae 9cab9807e0 Some more zsh completion tidy up
Changes for consistency across functions

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-21 07:40:49 -05:00
Allan McRae c3e72e11b6 Fix zsh completion
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>
2011-03-21 07:40:27 -05:00
Dave Reisner ff713a51bd remove antiquated contrib/wget-xdelta.sh
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>
2011-03-17 10:05:33 -05:00
Dan McGee 656b470163 contrib/Makefile.am: don't simplify what you don't understand
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>
2011-03-16 10:38:35 -05:00
Dan McGee 0f24390fe8 pkgsearch: handle non-matching lines gracefully
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>
2011-01-24 15:20:10 -06:00
Dan McGee d6a997ee38 Update contrib/ Makefile
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>
2011-01-24 15:19:14 -06:00
Dan McGee bf46e04614 Remove epoch as an independent field
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>
2011-01-21 19:30:45 -06:00
Allan McRae 2052f29cdb makepkg: add option to clear buildflags
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>
2010-12-29 19:28:33 -06:00
Xavier Chantry 622e7fdd4f contrib: remove bash pactree
This has been rewitten in C which is much much faster.

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
2010-12-12 20:21:48 -06:00
Dan McGee a35610beba Merge branch 'maint'
Conflicts:
	lib/libalpm/be_local.c
	lib/libalpm/trans.c
2010-12-12 19:53:20 -06:00
Xavier Chantry 592211b6dc PKGBUILD.vim: add special licenses BSD MIT ZLIB Python
Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-28 09:31:22 -05:00
Carlos Diaz f5059038f2 bash_completion: remove upstream deprecated functions
Populate $cur and $prev with the new bash-completion 1.2 function,
_get_comp_words_by_ref.

_get_cword and _get_pword have been deprecated.

Signed-off-by: Carlos Diaz <839273@gmail.com>
2010-10-14 06:53:12 -05:00
Dan McGee 0d5fa576b3 Update contrib/ for epoch
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-13 23:29:27 -05:00
Dan McGee 6eedf06fcc Fix bash shell location check
BASH is defined when you are actually using bash during configure, which
sucks because it ends up being '/bin/sh', messing up all of our scripts.
Change the name of the variable we use in configure, and also ensure we get
a full path to the executable by using AC_PATH_PROGS rather than
AC_CHECK_PROGS. Finally, change the variable name everywhere we use it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-13 17:50:54 -05:00
Dan McGee a7dc3875f1 contrib/ follow-up work
* Add a .gitignore file
* Use the same 'GEN' output we have in the scripts/ Makefile when doing our
  edits on the .in files
* Remove PKGBUILD.vim and vimprojects from our edit list, they have no need
  to be in the list

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-12 08:26:50 -05:00
Nezmer 05f0a28932 Use sysconfdir, localstatedir, BASH instead of hardcoded values
This applies to contrib/ files, our scripts, and the documentation.

Dan: fix 'make clean' in contrib/ directory.

Signed-off-by: Nezmer <git@nezmer.info>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-11 20:29:22 -05:00
Nezmer bce3c8efc7 Add .in extension to files in contrib
This is needed If we want to use sysconfdir,localstatedir and other variables.

Signed-off-by: Nezmer <git@nezmer.info>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-11 20:29:22 -05:00
Dan McGee 1e0e5b2a02 Remove use of `seq` in pactree
This is not a bash builtin, so can potentially cause portability issues.
Additionally, the use of it is completely unnecessary as it can all be done
within bash (and done faster).

$ time pactree xfwm4 >/dev/null (old version)
real	0m3.245s

$ time ./contrib/pactree xfwm4 >/dev/null (new version)
real	0m3.042s

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-11 10:06:57 -05:00
Allan McRae fd38319106 bacman: unify package creation with makepkg
Currently bacman always compresses with gzip now matter what PKGEXT is
set to.  Rework the entire package creation process to be similar to
that in makepkg.  This also make the explicit assumption that PKGEXT is
defined in makepkg.conf.

Thanks to Nelson Chan <khcha.n.el@gmail.com> for the original patch to
fix the incorrect package compression.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-15 08:54:34 -05:00
Dave Reisner 52118bf0f0 bash_completion: negate expression inside brackets
Avoids letting the shell evaluate ! as something else (e.g. an alias).

Signed-off-by: Dave Reisner <d@falconindy.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-27 10:11:04 -05:00
Andres P 6f4f9c1b66 bash_completion: fix bash 3.2 incompatibility
To avoid errors with bash 3.2, compopt will be skipped if it's not a
shell builtin.

compopt is needed to not append slashes to package names that
coincide with directories in PWD.

This is currently not possible to fix in bash versions that do not support
compopt, so these users will have to bear that regression.

Signed-off-by: Andres P <aepd87@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-23 13:32:21 +10:00
Dan McGee 756e49259d contrib: kill gensync/updatesync
These are old and have outlived their usefulness at this point. Kill them.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-03 14:07:48 -05:00
Dan McGee 3064f8d08d Update pacsearch to work with new Qs/Ss output
Now that we have the '[installed]' text, update pacsearch to look for it and
highlight it instead of the former '***' prefix.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-27 09:18:20 -05:00
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
Dan McGee 10b0acfc20 PKGBUILD.vim: only allow hex characters in checksums
Of course, we still have only md5 and sha1 hardcoded here but I resisted the
urge to copy paste for the rest of our supported checksums in hope that
someone knows how to do it a better way.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-13 17:46:30 -05:00
Dan McGee 07b2ba251f Add 'pkgbase' highlighting to vim syntax file
Simple change and probably a bit too copy/paste, but works for now.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-13 17:26:54 -05:00
Xavier Chantry df833f6c64 PKGBUILD.vim : update valid licenses
Updated list with :
echo $(pacman -Ql licenses | grep "/usr/share/licenses/common/.*/$" | cut
-d'/' -f6 )

Maybe PKGBUILD.vim could do this at runtime ?

Dan: you forgot the symlinks; readded FDL, GPL, LGPL.

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-13 17:11:25 -05:00
Christophe Chapuis 753599b504 contrib/pactree: generate reverse dependency trees
Add an option to show the tree of packages which depend on a given
package

Signed-off-by: Allan McRae <allan@archlinux.org>
2010-04-26 18:49:11 -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