summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-05-09recursedeps: include cyclic dependenciesAndrew Gregory3-52/+94
Cyclic dependencies (A depends on B, B depends on A) were not selected because neither package could be removed individually, so can_remove_package would always return false for both. By preselecting all dependencies then filtering back out any dependencies still required by any packages that will not be uninstalled, groups of unneeded cyclic dependencies can be found. Fixes FS#41031 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 6ac2ee21b30f3c5f331d19349f96bb8e5b020b47)
2017-05-09pacman.8: add link to alpm-hooks(5) in see alsoChristian Hesse1-1/+2
Signed-off-by: Christian Hesse <mail@eworm.de> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 839417e8c65e73e632c77d3ecd68539494850de1)
2017-05-09libalpm.3: add link to alpm-hooks(5) in see alsoChristian Hesse1-1/+2
Signed-off-by: Christian Hesse <mail@eworm.de> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit f018317f488e35f3a9a3ce43c977baceec13d08b)
2017-05-09makepkg: ignore the architecture for --printsrcinfoAlastair Hughes1-1/+1
Signed-off-by: Alastair Hughes <hobbitalastair@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 87082e3f44c4f92c63d881db38a0fff0565fc9bc)
2017-05-09Avoid logical OR duplication warning from gcc-6Allan McRae1-2/+12
The value EAGAIN is allowed by POSIX to be the same as EWOULDBLOCK, but this is not guaranteed. Thus on some systems (e.g. glibc Linux), we get a warning that the logical OR is being performed on two expressions of the same type. We can not get rid of this test in case any system defines these as unique values. Suggested-by: Dave Reisner Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 3729ef7a9acf75080fb6f60d13ea80cfd36d855d)
2017-05-09pacsort help clearly states that files contain inputs to be sortedAshley Whetter1-1/+4
Fixes FS#44121 Signed-off-by: Ashley Whetter <ashley@awhetter.co.uk> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 6c96ad36e082755e8a008b34aedde55a9a9f3dcd)
2017-04-28Prevent wrapping of enum itemsAllan McRae2-2/+2
GCC-6 points out that the value we use for the sentinal in enums is actually too large for the integer type. Reduce the bitshift by one to fix this. Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 5b9bc6024c246f232c64f6409088fedf558917af)
2017-04-28fix spelling mistakesEric Engestrom5-7/+7
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 2694d17ad99bab1cea5aad0ea4781ea4d51e596b)
2017-04-28use multi-byte character matching for user inputAndrew Gregory1-2/+34
Fixes FS#47992 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 02731189f1ced6050238e4af7e76a54d4ac6f3bd)
2017-04-28repo-add: do not alter the database if only verifying signatureAllan McRae1-0/+11
Fixes FS#48085. Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit f363cf78575cc4c54dee5801274e55d07e0971b1)
2017-04-28Use versions specified in optdependsAllan McRae2-3/+4
Checking install status and if a package is optionally required on removal now considers the version of the optdepend. Fixes FS#44957. Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 3da06c3519ad8df60ce8c067cdaeddb69a320a53)
2017-04-28Consider provides when warning about optdepnd removalAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 59112e186b5c64350db79f39574c6927a10346b6)
2017-04-28Consider provides when labelling optdepends status as pending installAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 76a7d2293c0e7a732254a1cfea6a62df07b8795e)
2016-05-18Use a more generic regexp when parsing output of gpg(1) in signature ↵Leonid Isaev1-1/+1
verification. The current way of extracting key trust from output of gpg --verify is not very robust against changes in the format of said output. As a result, pacman-key can return an error even if the signature is actuall good. This change relaxes the regexp when parsing output of gpg. Signed-off-by: Leonid Isaev <leonid.isaev@jila.colorado.edu> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 892a1076c00a2b0097145c35f5d8ef590216dac0)
2016-05-05PKGBUILD.5: document that the pkgver() function runs after prepare()Allan McRae1-4/+4
Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 59010386106eded2ee67798fa80215f250a53761)
2016-05-05Do not add root prefix twice when checking database filesAllan McRae1-24/+30
When checking .INSTALL and .CHANGELOG files in the mtree file, we need to find the path they are stored in the local database. This was appending the root prefix twice as alpm_option_get_dbpath already returns the absolute path to the database. While fixing that issue I added checks that the paths for the database files were not longer than PATH_MAX. Fixes FS#48563. Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 2ee1706a72858ea365c0e7a1a72d92ef2dae2f75)
2016-05-05libmakepkg: ensure emptydir find command acts on individual directoriesAllan McRae1-1/+2
Using "-exec command {} +" systax exits on any error. Such errors occur when running rmdir on a non-empty directory. Switch to "{} ;" syntax instead which avoids exiting before the find command is completed. Fixes FS#48515. Note, we can not use "-empty" in the find command because it is not supported by Busybox find, and the "--ignore-fail-on-non-empty" flag for rmdir is not available on BSD rmdir variants. Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit baf1ff64e6ea23e93f307480480d87159cd2e487)
2016-02-26libmakepkg: fix is_array functionAllan McRae1-1/+1
This happened to work for the majority of cases because the only calling function used a variable named "i" that was related to the variable being passed to the function. Fixes FS#48340. Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-26Update NEWS for pacman-5.0.1Allan McRae1-0/+17
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-23Release 5.0.1v5.0.1Allan McRae2-2/+3
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-23Regenerate translations for 5.0.1Allan McRae128-15180/+22370
2016-02-23Manually fix space before ellipses in translationsAllan McRae49-97/+97
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-23Fix inconsistent status messagesStefan Tatschner1-1/+1
This patch fixes an inconsistency in the status messages. :: Proceed with installation? [Y/n] :: Retrieving packages ... <--- Space before "...". blas-3.6.0-4-x86_64 cblas-3.6.0-4-x86_64 lapack-3.6.0-4-x86_64 (3/3) checking keys in keyring (3/3) checking package integrity (3/3) loading package files (3/3) checking for file conflicts (3/3) checking available disk space :: Processing package changes... <--- No space before "..." (1/3) upgrading blas (2/3) upgrading cblas (3/3) upgrading lapack Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-23Pull translation updates from TransifexAllan McRae129-14410/+7324
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-23makepkg: do not run prepare() with --noextractEvangelos Foutras2-8/+8
This is partial revert of 8454daa7feef (makepkg: run pkgver() and prepare() with --noextract). Reasoning for the reversion (copied from FS#43498): Running prepare() when --noextract is used no longer allows running 'makepkg -o && makepkg -e' with any PKGBUILD that applies patches in prepare(). [1] Sure there's --noprepare which restores the old behavior, but that's a lot of extra typing for what I believe is a much more common use of --noextract. For OP's use case of doing git bisects, you can specify the commit in the source array and thus skip --noextract since makepkg will checkout the correct commit each time. [1] I often extract the sources using 'makepkg -o', manually edit some source files, and then use 'makepkg -e' to package it (while possibly repeating the edit/package steps). Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-23make alpm_unlock and trans_interrupt async safeAndrew Gregory3-4/+10
RET_ERR calls _alpm_log which includes calls that are not safe for use in asynchronous signal handlers (see signal(7)). Replace it in functions called from our signal handlers with a new macro RET_ERR_ASYNC_SAFE which is identical except that it lacks the call to _alpm_log. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2016-02-23alpm_run_chroot: always connect parent2child pipeAndrew Gregory1-7/+6
Commit e374e6829cea3512f0b4a4069c5a6168f0f8d8a0 closed stdin before running scripts/hooks. This left the exec'd process with no file descriptor 0. If the process subsequently opened a file it would be assigned fd 0, and could potentially be confused for stdin. Connecting and immediately closing the parent2child pipe ensures that the child has an fd 0 and that it is empty. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-23ensure gpgdir has a trailing slashAndrew Gregory1-9/+3
init_gpgme checks for various paths under gpgdir by concatenating them directly, giving warning messages incorrectly if gpgdir does not end with '/'. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-23do not rely on localdb for hook matchingAndrew Gregory7-13/+41
Relying on localdb to determine which trigger operations should match is completely broken for PostTransaction hooks because the localdb has already been updated. Store a copy of the old version of any packages being updated to use instead. Fixes FS#47996 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-21only include .SRCINFO comments in source tarballDominik Fischer1-4/+11
This avoids introducing unnecessary changes to the time stamp into package repositories that regularly use --printsrcinfo to update the .SRCINFO file. Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-21alpm-hooks.5: document hook running orderAllan McRae1-1/+2
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-21only remove pacnew file if it is newAndrew Gregory3-3/+28
Check if we overwrote an exiting pacnew file before unlinking it. Otherwise, updating to a version with an unchanged file would delete existing pacnew files. FS#47993 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-20makepkg: remove pkg from OPT_LONG arrayAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-20Revert "makepkg: Empty/create only $pkgdir's relevant to current PKGBUILD"Allan McRae1-5/+2
This reverts commit f9423cfa5d5b9f2041b70676438082faad1cd1ee. This created issue when building packages with debug info multiple times. It could be fixed, but it confirmed my initial opinion that keeping other directories in $pkgdirbase was wrong. Use different BUILDDIRs if you want to build different things from a single PKGBUILD.
2016-02-20Log to file when running hooksOlivier Brunel1-1/+1
Useful if there's some output (to know where it comes from), or in case of failure. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-20doc/alpm-hooks: mention that hooks must have a ".hooks" suffix.Allan McRae1-1/+2
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-20Make "makepkg -g" ignore the current architecture.Alastair Hughes1-1/+2
Commit 663c74150ab4ba6d3adc55b0e3f539557a16e352 (makepkg: merge arch dependent variables after PKGBUILD linting) broke "makepkg -g" on a PKGBUILD which did not include the current architecture, by moving the lint_pkgbuild call before GENINTEG was processed. Fix that by setting IGNOREARCH for the "-g" option. Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-20libmakepkg: increase robustness of the detection of array variablesAllan McRae2-3/+20
Extract array detection into its own utility function that ensures extglob is enabled. Suggested-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-20repo-remove: fix checking for non-existent .db databaseAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-20Add the missing limits.h include to hook.cAlastair Hughes1-0/+1
PATH_MAX is only defined in limits.h in musl libc, so ensure that it is included. Presumably this is also required on other platforms. Signed-off-by: Alastair Hughes <hobbitalastair@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-20doc/index.txt: update for pacman 5.0Andrew Gregory1-4/+9
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-20dump_pkg_info: fix wide character title alignmentAndrew Gregory1-5/+12
The padding added to the end of the title was based on the return value of mbstowcs which is the number of characters. This caused alignment issues for languages with characters that span multiple columns. Instead, base the padding on the number of columns needed by the translated string as returned by wcswidth. Fixes #47980 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-20Bring makepkg zsh completions up to dateDoug Newgard1-8/+13
Signed-off-by: Doug Newgard <scimmia@archlinux.info> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-30Release 5.0.0v5.0.0Allan McRae1-5/+5
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-30Update translationsAllan McRae118-1858/+6053
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-29Update zsh completion for pacman 5Daniel Wallace1-2/+39
also include updates from pacman 4.2 https://bugs.archlinux.org/task/47559 Original-patch-by: Boris Staletic <bstaletic@archlinux.net> Signed-off-by: Daniel Wallace <danielwallace@gtmanfred.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-29Create makepkg-template and system hook directories upon installAllan McRae1-2/+3
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-29Add HookDir to example pacman.confAllan McRae1-0/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-29bash_completion: update pacman completionAllan McRae1-5/+9
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-27bash_completion: update makepkg completionAllan McRae1-6/+7
Signed-off-by: Allan McRae <allan@archlinux.org>