1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-10-31 15:45:03 -04:00
Commit Graph

5974 Commits

Author SHA1 Message Date
Allan McRae
3c46420367 repo-add: unify checking gpg keys
Move the PGP key checking into the check_gpg function.  This also results in
error messages being in colour.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-12 13:35:19 +10:00
Allan McRae
cf3d5e4830 repo-add: clarify invalid repo extension message
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-12 13:35:09 +10:00
Allan McRae
b5b2f0b1bf repo-add: improve removing old packages
The -R/--remove option left the old package in place when delta packages
were to be generated.  It was also removed before we ensure the generation
of the entry for the new package was generated without error.

Remove the old package at the end of database entry and delta generation. Also
improve the help message to clarify it is the old package that is removed.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-12 13:35:01 +10:00
Allan McRae
27e3125c8d Merge branch 'maint' 2015-02-12 13:33:20 +10:00
Allan McRae
ba869597fb Disable directory ownership warnings
There was a lot of confusion regarding these warnings, particularly for
packages that create users post_install and then chown the directories.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-12 13:25:44 +10:00
Andrew Gregory
0c9f4329f8 set package origin when adding to db cache
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-12 13:22:40 +10:00
Allan McRae
43413894d4 valgrind.supp: remove library version from suppression
glibc installs the library /usr/lib/ld-?.??.so with its version.  Wildcard
this so the suppresses the warning for all glibc versions.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-12 13:22:32 +10:00
Andrew Gregory
c3161925c2 sync200.py.in: remove unused substitution
LIBCURL was never set in the Makefile so XferCommand was always being
set in the test file.  This removes the only substitution in our test
files which will prevent the TESTS file from being rebuilt every time
configure is run.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-12 13:22:24 +10:00
Allan McRae
295a3491ad makepkg: split package tidying into libmakepkg
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:20:08 +10:00
Allan McRae
33466000d6 makepkg: split PKGBUILD/makepkg.conf option checking to libmakepkg
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:20:08 +10:00
Allan McRae
c8574baa7c makepkg: rename other_options to build_options
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:20:08 +10:00
Allan McRae
7885931c96 makepkg: split message functions into libmakepkg
This performs all the needed work for libmakepkg to be included in
tarballs, installed into the correct place, and read into makepkg.

Also change the install root for libmakepkg to an architecture independant
location.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:20:08 +10:00
Christian Hesse
9917930ae1 add option to optimize PNG images with optipng
This can decrease package size by optimizing PNG image size. Images are
just stored with better compression and/or filter options. The actual
image content is not altered.

Additionally this can automatically fix broken PNG images which caused
some trouble lately.

Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:19:04 +10:00
Christian Hesse
bd2e95b00b remove globbing for upx and make UPXFLAGS an array variable
Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:19:04 +10:00
Allan McRae
2e48101999 Update copyright notices for 2015
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:19:04 +10:00
Allan McRae
325be32acd pmenv.py: Fix typo in copyright assignment
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:19:04 +10:00
Allan McRae
bbac318d7a Add make rule to update copyright years
Usage: make update-copyright OLD=2014 NEW=2015

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:19:03 +10:00
Allan McRae
54c630f6ec Merge branch 'maint' 2015-02-01 21:18:31 +10:00
Allan McRae
10fc538c70 makepkg: refix removing static libraries when shared uses absolute symlinks
Commit 9e5e86aa was supposed to fix this.  Instead I picked another [[ -f ]]
statement in the same region and added the hardlink test to it instead, thus
not fixing the bug.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:17:14 +10:00
Andrew Gregory
841e531c51 trans_commit: restore pm_errno after updating log
If the call to alpm_logaction failed it would overwrite pm_errno,
leading to error messages unrelated to the actual reason the transaction
failed.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:13:11 +10:00
Allan McRae
3b22183a4d contrib: remove fakeroot option from PKGBUILD.vim
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:12:45 +10:00
Lukáš Jirkovský
8391716b8a makepkg: Set the working copy destination explicitly when cloning in extract_git
This fixes the issue where if the user explicitly set the name of the cloned source
to eg. foo.git, the directory name in $SRCDEST would be foo.git as expected, but the
clone in $srcdir would be stripped of the .git suffix.

Signed-off-by: Lukáš Jirkovský <l.jirkovsky@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:11:25 +10:00
Jeffrey Tolar
aa12a773b8 Add --noarchive to makepkg's zsh completion
Signed-off-by: Jeffrey Tolar <tolar.jeffrey@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:11:15 +10:00
Jeffrey Tolar
50de87e0e6 Remove --asroot from makepkg's completions
Signed-off-by: Jeffrey Tolar <tolar.jeffrey@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:11:06 +10:00
Andrew Gregory
5167160c0c extract_single_file: consolidate extraction logic
Also adds checks that the filename does not exceed PATH_MAX.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21 14:27:47 +10:00
Andrew Gregory
ba0d225d93 extract_single_file: use .pacnew for check files
Prevents the need to rename the file if we end up keeping it and ensures
that pacnew files always reflect the most recent version by overwriting
stale copies.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21 14:27:47 +10:00
Andrew Gregory
926280cfc7 remove support for .pacorig files
Leave user files in place and save new config files with a .pacnew
extension.  This reduces the complexity of file extraction and respects
the principle that pacman shouldn't modify files it didn't create.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21 14:27:47 +10:00
Andrew Gregory
a82a5cf3f7 extract_single_file: use full path in messages
If an error occurs the actual path being extracted is more useful than
the original path from the package file list.  The original path is
still used for checks that use it directly.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21 14:27:47 +10:00
Andrew Gregory
4ba0561fe7 extract_single_file: factor out db file extraction
alpm's database files (.INSTALL, .MTREE, etc.) should be extracted no
matter what; skip mtree/needbackup/noextract/noupgrade checks for them.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21 14:27:47 +10:00
Andrew Gregory
f917a4a55a extract_single_file: reduce indentation
Puts all of the conflict cases at the same level.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21 14:27:47 +10:00
Andrew Gregory
63660afbc7 extract_single_file: consolidate needbackup checks
We need to know if a file needs to be backed up for all extracted files.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21 14:27:47 +10:00
Andrew Gregory
3b20561748 ini.c: move error output into conf.c
Move the remaining output into conf.c by notifying the callback of read
errors.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21 14:27:47 +10:00
Andrew Gregory
ea96b56722 ini.c: remove useless key check
key points to a statically allocated string so it can't be NULL and
empty keys are rejected by the callback.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21 14:27:47 +10:00
Andrew Gregory
e7d8e2b5ac ini.c: remove empty section name restriction
alpm will reject empty database names already.  Reduces error handling
in the ini parser.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21 14:27:46 +10:00
Andrew Gregory
4ccafc484d ini.c: remove unnecessary helper function
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21 14:27:46 +10:00
Andrew Gregory
09cfe2a4c0 ini.c: move Include parsing to conf.c
Reduces the number of errors the ini parser must handle to make it more
suitable for sharing with the backend.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21 14:27:46 +10:00
Andrew Gregory
9eb07a81fa ini.c: remove final callback call
Storing repo information removes the need for the final callback.  This
allows the call signature to be re-purposed for indicating read errors.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21 14:27:46 +10:00
Andrew Gregory
7ed0d60a0d conf.c: parse config in a single pass
Fixes FS#28255

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21 14:27:46 +10:00
Andrew Gregory
95121cc4f1 conf.c: use masks for siglevel inheritance
This will allow pacman to parse its config file in a single pass and
removes the need for the *_SET siglevels in alpm that were only required
for pacman's siglevel inheritance.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21 14:27:46 +10:00
Andrew Gregory
2aa85c3bfd conf.c: store repo settings in dedicated struct
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21 14:27:46 +10:00
Allan McRae
92febc847c Merge branch 'maint' 2015-01-21 14:27:25 +10:00
Daniel Micay
c6263da168 fix geometric growth in _alpm_greedy_grow
It was allocating the required size rather than the calculated new size,
resulting in pathological incremental reallocations.

Signed-off-by: Daniel Micay <danielmicay@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-21 14:27:04 +10:00
Daniel Micay
21281e9b69 be_local: fix _alpm_greedy_grow usage
The files_size variable contains the current capacity (in bytes) and
should not be used to calculate the next length increment. It only works
because _alpm_greedy_grow currently results in incremental growth.

Signed-off-by: Daniel Micay <danielmicay@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-21 14:26:54 +10:00
Allan McRae
018fa2b48c Merge branch 'maint' 2015-01-12 15:23:30 +10:00
Allan McRae
a31426d3ea makepkg: clear destination array in array_build
If an already used array is passed array_build, some entries from the old
array could be carried over if the old array was longer than the new one.
Clear the destination array before adding elements to it to prevent this
issue.

Fixes: https://bugs.archlinux.org/task/43387

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-12 15:23:01 +10:00
Florian Pritz
0108884952 test makepkg-template: Add update-version-with-newest-option
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11 18:58:25 +10:00
Florian Pritz
d5f703729f test makepkg-template: Add template-without-version
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11 18:58:25 +10:00
Florian Pritz
bd2473797e test makepkg-template: Add name-charset-valid
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11 18:58:25 +10:00
Florian Pritz
6201f6e5ac test makepkg-template: Add name-charset-invalid
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11 18:58:24 +10:00
Florian Pritz
4dd9ccbc78 test makepkg-template: Add missing-template-symlink
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11 18:58:24 +10:00