1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00
Commit Graph

6001 Commits

Author SHA1 Message Date
Dave Reisner
ca5a2771ae updpkgsums: retain permissions on rewritten PKGBUILD
This could have been easy with something like chown's --reference flag,
but this is GNU specific. Instead, just truncate and rewrite the file.
Our exit trap cleans up after us.

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

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-02 21:43:28 +10:00
Allan McRae
39fe2d0e39 Remove outdated fakeroot information from PKGBUILD man page
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-02 21:43:28 +10:00
Andrew Gregory
f1e010a5a7 add tap_ prefix to test helper functions
Allows tap.sh to show the line number where the helper function was
called on failures.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-28 13:06:39 +10:00
Andrew Gregory
29c0d8233b use tap.sh for bash tests
tap.sh is a reusable TAP library that handles test counting and provides
useful diagnostic messages on test failures.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-28 13:06:28 +10:00
Allan McRae
4c4890dd1c Clarify "assume installed" error message
The error message on failing to add an "assume installed" entry to the backend
was not clear.  Clarify by making "assume-installed" none translatable and
adding a hyphen to match calling flag.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-28 13:06:15 +10:00
Allan McRae
2759858e8c Merge branch 'maint' 2014-12-28 13:06:04 +10:00
Allan McRae
acc639adf2 Fix .SRCINFO output with architecture specific fields
Do not merge the architecture specific fields when creating a .SRCINFO file.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-28 13:05:41 +10:00
Dave Reisner
6356567ae0 makepkg: print the name of the source array being checked
I don't see an easy fix to avoid printing this more than once, so let's
at least differentiate the messaging so that it's more clear what's
going on.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-27 17:08:33 +10:00
Dave Reisner
7c0ff7f4b7 makepkg: call out the source array(s) missing checksums
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-27 17:08:33 +10:00
Allan McRae
763fb3d9e7 Remove logically dead code in _alpm_local_db_write
We can only get to cleanup: through fp being NULL due to fopen failing or
normal execution when fclose is called.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-27 17:08:32 +10:00
Allan McRae
804688ab6a _alpm_run_chroot: only close working directory if it was opened
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-27 17:08:32 +10:00
Allan McRae
2f0ca00e55 _alpm_db_add_pkgincache: free potential memory leak
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-27 17:08:32 +10:00
Allan McRae
60d958c78b Initialize memory to prevent issues when freeing on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-27 17:08:32 +10:00
Allan McRae
be4198b34e _alpm_recursedeps: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-27 17:08:32 +10:00
Allan McRae
32413213cb apply_deltas: fix memory leak on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-27 17:08:32 +10:00
Allan McRae
d5e93e895b pacsort: fix memory leak
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-27 17:08:32 +10:00
Allan McRae
25b492aab6 Merge branch 'maint' 2014-12-27 17:07:04 +10:00
Allan McRae
5221440b6b fix duplication of package sha256sum
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-27 17:04:53 +10:00
Dave Reisner
286dc83451 makepkg: fix typo in dep array name
We fixed this up to check architecture specific sources in ec679e09b2,
but fudged the array name in the in_array call.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-27 17:04:29 +10:00
Johannes Löthberg
1f1e53c208 libalpm: Add accessors for the base field
This commit adds the necessary accessor functions to get the PKGBASE of
a package, forcing the desc file to be parsed.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:30 +10:00
Johannes Löthberg
9f527d2de4 libalpm: Parse and write PKGBASEs
This commit adds support to libalpm to parse the pkgbase present in
packages .PKGINFO files, writing the PKGBASE to the %BASE% section of
the local DBs desc files and for parsing it again when loading the local
DB

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:30 +10:00
Andrew Gregory
fda599df37 add vim modeline to test files
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:30 +10:00
Allan McRae
21faf1682e mount_point_list: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:30 +10:00
Allan McRae
2114ef1874 conflict_new: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:30 +10:00
Allan McRae
9cf1b2c004 _alpm_runscriptlet: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:30 +10:00
Allan McRae
88eedef6c6 add_fileconflict: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:30 +10:00
Allan McRae
52d2ff648d create_tempfile: fix memory leak on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:30 +10:00
Allan McRae
123ecb8e07 _alpm_split_backup: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
c6dd581ec5 alpm_dep_from_string: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
27506aba8f _alpm_conflict_dup: fix memory leak on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
46459da39b local_db_read: fix memory leak on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
895780bd9a _alpm_db_new: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
87e55a4ee7 _alpm_db_get_pkgcache_hash: check for error when loading pkgcache
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
cd5e4b89f4 _alpm_delta_parse: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
e892234207 _alpm_dep_dup: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
f4796c905c pacman/util.c: fix potential memory leak in indentprint 2014-12-24 11:19:29 +10:00
Allan McRae
eac09e1d9f Fix memory leak in ALPM_EVENT_OPTDEP_REMOVAL callback
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
c0d9d26070 build_payload: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
32ebd7ad5d depmiss_new: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
bf06efaa78 _alpm_delta_dup: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:28 +10:00
Evangelos Foutras
eb7cc246c6 checkupdates: include package versions in output
Especially useful now that pacman -Qu will also show the new version.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:28 +10:00
Evangelos Foutras
c9ca363431 checkupdates: show error when fakeroot is missing
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:28 +10:00
Allan McRae
863cfb5808 Improve db upgrade error message
This message is clearer without (another) error prefix.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:28 +10:00
Dave Reisner
d2d00e4543 makepkg: properly correlate checksums for multiple sources
Previously, we used a single boolean value to determine correlation of
sources to checksums. Since the introduction of arch-specific sources,
this is no longer sufficient, as we must ensure that we have checksums
for (potentially) multiple source arrays.

This change inlines the logic of have_sources to build an associative
array of source array names, unsetting them as we discover their
checksums. The error condition then becomes a non-empty correlation
array.

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

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:15:38 +10:00
Evangelos Foutras
c07593c64c Use correct mode bits for the log file (0000 -> 0644)
Following commit 086bbc5 (Use O_CLOEXEC as much as possible when opening
files), the log file would be created by pacman with blank permissions.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:15:25 +10:00
Peter Wu
a1c50a08c9 pacman-db-upgrade: set umask 022
This prevents the database from becoming inaccessible for non-root
users when the script was executed with a umask of 027.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:15:15 +10:00
Allan McRae
325e20dea1 makepkg: download sources for all architectures when making source package
We validated all sources when making a source package, whether or not they
are included in the tarball.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:15:00 +10:00
Allan McRae
23850c7c99 pacman-db-upgrade: be more verbose
People have mentioned that the silent upgrade to DB version 9 when no
adjustments are needed for directory symlinks is confusion.  Always print
the upgrading message.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:14:50 +10:00
Florian Pritz
c8448bb466 makepkg-template: Remove unused printf format string
I'm pretty sure this is some kind of left over stuff that was supposed
to print the filename, linenumber and line content. This is already
done so just remove it.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-22 14:01:43 +10:00
Allan McRae
ec679e09b2 Check architecture specific fields for VCS support
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-22 14:01:34 +10:00