summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-02-06makepkg.sh.in - fix remove_deps test for deps to be removedAndrew Gregory1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-06makepkg: add forgotten newline in help outputMantas Mikulėnas1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-03pactest: check return code in some upgrade testsDan McGee4-0/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-03Add simple integer-only pow() implementationDan McGee1-2/+13
We hardly need the complexity (or slowness) provided by the libm power function; add a super-cheap one that suits our needs and is specialized for the values we plan on passing in. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-03Fix FS#27924: don't display negative zeroesThomas Dziedzic4-13/+22
Dan: don't compute lower bound unless needed, flip argument order so out values are last, add param Doxygen documentation. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-31makepkg: Fix non-writable SRCPKGDEST error messageAllan McRae1-0/+5
Provide a helpful error message for when creating a source tarball and SRCPKGDEST is not writable. Fixes FS#28197. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-31Fix rare segfault on package removalAllan McRae1-1/+4
Very rarely a segfault would occur when removing a number of packages due to a corrupted list for the local database (FS#27805, FS#28195). This was caused by the alpm_list_msort function not correctly dealing with the two new head node's prev values. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-31Update translationsDan McGee55-817/+2347
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-31Update pot translation catalogsDan McGee2-19/+59
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-31Make a few more copyright date tweaksDan McGee3-5/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-31scripts: always use printf with embedded gettextDave Reisner6-96/+96
This addresses two problems: 1) echo's behavior is inconsistent when dealing with flags, and can potentially be problematic. $ echo -n $ echo -- -n -- -n 2) Always using the end of options markers prevents translated strings from throwing errors, as shown in FS#28069. The remaining "inconsistencies" are because printf is being used in a guaranteed safe manner, e.g. printf '%s\n' "$(gettext "--this can never break")" Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-31makepkg: workaround for zipman issuesAllan McRae1-1/+2
This "fixes" two issues: 1) MAN_DIRS contains a glob by default so should not be quoted. It is not quoted anywhere else so this should not cause breakage... 2) the find statement returns 1 when some of MAN_DIRS are missing. This appears to only be exposed when running makepkg as root (which it appears some wrappers do...). Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-23lib/dload: give uniform naming to curl CB functionsDave Reisner1-4/+4
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-23Fix sys/mnttab.h header includeDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-23lib/dload: enforce usage of TCP keepalivesDave Reisner2-1/+55
This is particularly important in the case of FTP control connections, which may be closed by rogue NAT/firewall devices detecting idle connections on larger transfers which may take 5-10+ minutes. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-23makepkg: restrict usage of flags passed to pacmanAllan McRae1-1/+5
With pacman-4.0, using --noconfirm or --noprogressbar with -Q or -T results in pacman reporting an "invalid option" error. Restrict the passing of these options to pacman. Fixes FS#28012. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-23makepkg: fix error on unnecessary -rAllan McRae1-3/+4
The grep statement used to check for a difference between the installed package list before and after resolving dependencies returns 1 if there is no difference. This sets of the error trap when "-r" is used "unnecessarily". Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-19contrib/bash_completion: don't print stderr messagesDan McGee2-3/+3
If you are a crazy developer like me and have bogus options in your pacman.conf file, the tab completion gets messed up by the output on stderr. Suppress it. Fix the same basic issue in zsh_completion, thanks to the work by Florian Pritz <bluewind@xinu.at>. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-19Add diskspace checking support for Solaris/IllumosDan McGee2-6/+51
Was able to get my hands on one of these boxes today, so add yet another new way of doing this. I'm glad these calls are so standardized. This was compile tested on Linux and Illumos and seems to still be working in both places. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-19Update copyright on changed files since beginning of yearDan McGee11-14/+14
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-19util.c, rmrf(): only create string when neededOlivier Brunel2-6/+6
The entry's name is only used when not "." or ".." so only print the string then. Signed-off-by: Olivier Brunel <i.am.jack.mail@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-19Fix missing [removal] outputAllan McRae1-1/+5
Currently, a transaction is considered to be purely package removal until the first package install is found. This resulted in the removed packages at the start of a combined upgrade/removal transaction not getting the "[removal]" output. Fixes FS#27981. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-19Improve exit statuses and error messages in pacman-keycanyonknight1-23/+95
Return codes from gpg commands are currently lost. This adds the functionality of taking non-zero exit statuses from gpg. This includes error reporting for all gpg commands that are run individually, run in a loop, and run through a pipe. Includes the check_keyids_exist function which verifies a key exists locally prior to attempted local manipulation of the key. If a gpg command has a non-zero status, pacman-key will now exit with a non-zero status. It will print a gettext error message of gpg's failure. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-19Turn gpg commands into functions in pacman-keycanyonknight1-16/+58
Adds functions for every gpg command. By pulling out the gpg commands from the "program start" section, additional commands can be run before or after a specific gpg command without adding additional clutter to the function call section. Adds an explicit exit status of 0 to prevent arithmetic expansions from returning non-zero, thereby falsely causing pacman-key to have a non-zero exit status. This change creates the framework for additional error messages and better exit statuses being added to every pacman-key gpg call. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-19repo-add: clean up help messagesDan McGee1-6/+14
Use consistent blank lines across all commands, get rid of the translated double newlines which only serve to confuse translators, and fix -h/--help for that extra special third command this script offers. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-19Fix broken output when asking question and stdin is pipedOlivier Brunel1-0/+6
When asking question and stdin is piped, the response does not get printed out, resulting in a missing \n and broken output (FS#27909); printing the response fixes it. Signed-off-by: Olivier Brunel <i.am.jack.mail@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-19fetch_url: look for files in cache before downloadingDave Reisner1-32/+60
We lost this logic somewhere between the libfetch and libcurl transition, as it existed in the internal downloader, but was pulled back only into the sync workflow. Add a helper function that will let us check for existance in the filecache prior to calling the downloader. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-18Use isdigit() rather than character range comparisonsDan McGee1-1/+1
This is safer and guaranteed to work with even exotic character sets. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-18Remove unused strtoupper() functionDan McGee2-14/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-18Don't remove unknown files in cache cleaning codeDan McGee2-23/+11
This removes the hack I added to skip '*.sig' files earlier since there are other files that also fall into the same bucket- source packages from `makepkg --source`, delta files, etc. Rather than prompting for each and every one, simply skip them. Doing '-Scc' rather than '-Sc' will delete these files if that is really what you want to do. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-13doc/vercmp: add note about pkgrel handlingDan McGee1-2/+7
This comes from the Doxygen function documentation. Also, fix two rather silly misspellings. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-12Use fileno() in isatty() callDan McGee1-1/+1
This was our only use of the function that had a hardcoded file descriptor. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-08makepkg: abort on missing download agentAllan McRae1-1/+2
makepkg would not abort on a missing download agent due to the output variable being declared local on the same line as the function call in the assignment. That would result in strange output such as: ==> Retrieving Sources... ==> ERROR: There is no agent set up to handle foo URLs. Check /etc/makepkg.conf. Aborting... -> Downloading foobaz... /home/arch/code/pacman/scripts/makepkg: line 401: foo://foobaz: No such file or directory ==> ERROR: Failure while downloading foobaz Aborting... Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-08makepkg: fix missing source file detectionAllan McRae1-1/+2
Declaring the variable as local on the same line as the assignment results in result of the assignment being returned rather than the result of the function on the righthand side of the assignment. Declaring the variable as local on a separate line means the result of the function on the r.h.s. is returned and our error function will be invoked if necessary (although it is practically impossible to ever trigger it...). Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-08makepkg: simplify source archive generationAllan McRae1-5/+3
Simplify the source tarball generation by unifying the handling of local and remote files. This also allows local files to be found in $SRCDEST (FS#26580) and makepkg will abort on missing local source files (only possible to trigger in combination with --skipinteg). Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-08Fix zsh completion for *.pkg.tarcanyonknight1-4/+4
Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-08Fix bash completion for *.pkg.tarcanyonknight1-2/+2
Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-06Update translations from TransifexDan McGee32-231/+387
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-06Update scripts translation catalogDan McGee1-2/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-05Remove useless logger messageDan McGee1-1/+0
We don't need two log messages back-to-back about the same thing here. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-05Search for PGP subkeys in a keyserver-acceptable wayDan McGee1-5/+21
PGP keyservers are pieces of sh** when it comes to searching for subkeys, and only allow it if you submit an 8-character fingerprint rather than the recommended and less chance of collision 16-character fingerprint. Add a second remote lookup for the 8-character version of a key ID if we don't find anything the first time we look up the key. This fixes FS#27612 and the deficiency has been sent upstream to the GnuPG users mailing list as well. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-03add new pactest for syncfirst with recursive depsDave Reisner2-0/+130
Add 1 failing for the -Su case, and the same case using -S (and passing). This is based on a real (current) issue of upgrading staging chroots with the new pacman in staging for a libarchive build, and a new toolchain in testing. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-03Prevent rebuild of man pages when using release tarballsAllan McRae1-3/+3
Commit 43cad9c8 made the building of all docs depend on the Makefile. However, the Makefile is generated after running ./configure so is always newer than any pregenerated docs. This means that people building from released pacman tarballs are forced to rebuild the docs (and thus have asciidoc installed). That defeats the purpose of prebuilding the documentation. Have the documentatin depends on Makefile.am instead as this is probably what was intended. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-29Fix bogus string cast in search debug messageDan McGee1-3/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-23pacman-key: Add missing quotesTimothy Redaelli1-3/+3
Signed-off-by: Timothy Redaelli <timothy.redaelli@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-23Allow comments after repo section header in pacman.confAllan McRae1-5/+7
Pacman assumes that the final character of a line specifing a repo in pacman.conf is a "]". But it did not clean whitespace from the line after removing any comments. So lines like: [allanbrokeit] # could break system caused pacman not to recognize the repo. Adjust config parsing to strip comments before trimming whitespace from the end of the string. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-12contrib/paccache: silence possible output from cdDave Reisner1-1/+1
If CDPATH is set, this could possibly write to stdout. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-12pacsysclean: Add new contrib scriptEric Bélanger3-1/+55
pacsysclean sort installed packages by decreasing installed size. It's useful for finding large unused package when doing system clean-up. This script is an improved version of other similar scripts posted on the forums. Thanks goes to Dan for fixing and improving my original script. Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-06Use correct size in memsetDan McGee1-1/+1
We were using the size of a pointer, not the size of the whole archive_read_buffer struct. Thanks to Clang/LLVM 3.0 and Allan/Dave in IRC for finding this one. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-05repo-add: enforce maximum .sig file sizeDan McGee1-7/+12
This prevents user error in adding a file generated via `gpg --sign` rather than `--detach-sign`, for example. The same 16KiB limit is used we use in our pacman download code. The section is moved above the checksum generation to avoid presenting info messages to the user if the signature isn't valid. Addresses a shortcoming pointed out in FS#27453. Signed-off-by: Dan McGee <dan@archlinux.org>