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

114 Commits

Author SHA1 Message Date
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
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
Allan McRae
0199a7ee71 contrib/bacman: fix checking if file has been added
Fixes FS#17140.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-15 19:18:56 -06:00
Heiko Baums
6ed7d001f6 pacdiff : add diffsearchpath option
Xav: added doc
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-24 09:55:50 -05:00
Cedric Staniewski
2cabe336eb Introduce new PKGBUILD variable changelog
Currently, a changelog is added to a package if a specific file with a
hardcoded name exists in the PKGBUILD's directory. This approach is not
pretty and also inconsistent with the handling of install files, but it
works.

With the introduction of split PKGBUILDs, however, a drawback in this
old behavior has arisen: you only have the possibility to include one
specific changelog file in either every package defined in the PKGBUILD
or in none.

The use of an additional variable, `changelog`, works around this issue
and makes it possible to include a changelog in only some of the
packages, and besides, each package of the PKGBUILD can have its own
changelog file.

Signed-off-by: Cedric Staniewski <cedric@gmx.ca>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-11 22:35:20 -05:00
Xavier Chantry
2e7c569950 Update doc and vim syntax for arch=any
This fixes FS#15870

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-07 15:13:38 -05: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
Dan McGee
c72b4543b6 Update copyright headers and messages
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-01 02:08:33 -05:00
Allan McRae
a864a50bc6 contrib/pacscripts - print install scripts from a package
Prints the install script from a given package file or from a package
in the pacman repo.

Original-work-by: Giulio "giulivo" Fidente <giulivo.navigante@gmail.com>
Improvements-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-03-15 11:38:53 -05:00
Xavier Chantry
dce7aa8569 contrib/pacdiff : rework and cleanup
I initially only wanted to add a -l/--locate option to use locate instead of
find, which should have been easy.

Then I thought I would try to support filename with whitespace while I was
at it, and this was a bit more complex. The safest ways seem to be the
following ones : http://mywiki.wooledge.org/BashFAQ/020

Then I received a lot of suggestions on #bash about how to improve the
script, which I tried to address.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
[Dan: fix grouping of find arguments]
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-18 19:20:10 -06:00
Allan McRae
b373b1d16b contrib/pactree: fix option parsing
The option parsing was catching any "-d" in an argument so packages
with this in their name did not work.

Also removed commented code line that appears to be inserted during
testing.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-12-07 22:09:05 -06:00
Dan McGee
5078ca580e pacsearch: quote args passed to pacman
Something such as "pacsearch foo|bar" would cause problems due to the
quoting being dropped. Adding quotes solves the problem.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-24 22:16:28 -05:00
Carlo Bersani
c317222d71 contrib: add pactree script
Pactree is a dependency tree viewer for installed packages.
It features both textual and graphic (through graphviz) output.

Script by: Carlo Bersani <carlocci@gmail.com>
[Allan: removed whitespace errors]
Signed-off-by: Allan McRae <allan@archlinux.org>
[Dan: killed some unnecessary lines, moved license header]
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-24 22:16:28 -05:00
Nagy Gabor
5f701005ed Use $PKGEXT (from /etc/makepkg.conf) in bacman
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-01 21:08:50 -05:00
Carlo Bersani
b15fb504a1 bacman: fix issue with symlink early copy
test -e tries to resolve the link before testing, so if the link is copied
before the actual file, the script exited. This fixes the issue.

[Dan: also add some improved quoting in the script]

Signed-off-by: Carlo Bersani <carlocci@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-22 21:21:05 -05:00
Allan McRae
fcac23763b bacman - regenerate package from system
Original work by Carlo "carlocci" Bersani with additions by
Xavier Chantry and Allan McRae

This script rebuilds an already installed package using metadata
stored into the pacman database and system files.  Replaces the
outdated re-pacman script

Signed-off-by: Allan McRae <mcrae_allan@hotmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-06 07:01:22 -05:00