summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Make a few more copyright date tweaksDan McGee2012-01-30
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* scripts: always use printf with embedded gettextDave Reisner2012-01-30
| | | | | | | | | | | | | | | | | | | | | | 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>
* makepkg: workaround for zipman issuesAllan McRae2012-01-30
| | | | | | | | | | | | | | 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>
* lib/dload: give uniform naming to curl CB functionsDave Reisner2012-01-23
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix sys/mnttab.h header includeDan McGee2012-01-23
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* lib/dload: enforce usage of TCP keepalivesDave Reisner2012-01-23
| | | | | | | | | 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>
* makepkg: restrict usage of flags passed to pacmanAllan McRae2012-01-23
| | | | | | | | | 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>
* makepkg: fix error on unnecessary -rAllan McRae2012-01-23
| | | | | | | | | | 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>
* contrib/bash_completion: don't print stderr messagesDan McGee2012-01-19
| | | | | | | | | | | 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>
* Add diskspace checking support for Solaris/IllumosDan McGee2012-01-19
| | | | | | | | | 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>
* Update copyright on changed files since beginning of yearDan McGee2012-01-18
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* util.c, rmrf(): only create string when neededOlivier Brunel2012-01-18
| | | | | | | | 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>
* Fix missing [removal] outputAllan McRae2012-01-18
| | | | | | | | | | | | 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>
* Improve exit statuses and error messages in pacman-keycanyonknight2012-01-18
| | | | | | | | | | | | | | | | 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>
* Turn gpg commands into functions in pacman-keycanyonknight2012-01-18
| | | | | | | | | | | | | | | | | | 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>
* repo-add: clean up help messagesDan McGee2012-01-18
| | | | | | | | 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>
* Fix broken output when asking question and stdin is pipedOlivier Brunel2012-01-18
| | | | | | | | | 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>
* fetch_url: look for files in cache before downloadingDave Reisner2012-01-18
| | | | | | | | | | 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>
* Use isdigit() rather than character range comparisonsDan McGee2012-01-18
| | | | | | This is safer and guaranteed to work with even exotic character sets. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove unused strtoupper() functionDan McGee2012-01-18
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Don't remove unknown files in cache cleaning codeDan McGee2012-01-18
| | | | | | | | | | 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>
* doc/vercmp: add note about pkgrel handlingDan McGee2012-01-12
| | | | | | | This comes from the Doxygen function documentation. Also, fix two rather silly misspellings. Signed-off-by: Dan McGee <dan@archlinux.org>
* Use fileno() in isatty() callDan McGee2012-01-12
| | | | | | | This was our only use of the function that had a hardcoded file descriptor. Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: abort on missing download agentAllan McRae2012-01-08
| | | | | | | | | | | | | | | | | | 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>
* makepkg: fix missing source file detectionAllan McRae2012-01-08
| | | | | | | | | | | | | | 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>
* makepkg: simplify source archive generationAllan McRae2012-01-08
| | | | | | | | | | 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>
* Fix zsh completion for *.pkg.tarcanyonknight2012-01-08
| | | | | Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix bash completion for *.pkg.tarcanyonknight2012-01-08
| | | | | Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Update translations from TransifexDan McGee2012-01-05
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update scripts translation catalogDan McGee2012-01-05
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove useless logger messageDan McGee2012-01-05
| | | | | | We don't need two log messages back-to-back about the same thing here. Signed-off-by: Dan McGee <dan@archlinux.org>
* Search for PGP subkeys in a keyserver-acceptable wayDan McGee2012-01-05
| | | | | | | | | | | | | | 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>
* add new pactest for syncfirst with recursive depsDave Reisner2012-01-02
| | | | | | | | | | | | 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>
* Prevent rebuild of man pages when using release tarballsAllan McRae2012-01-02
| | | | | | | | | | | | | 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>
* Fix bogus string cast in search debug messageDan McGee2011-12-29
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman-key: Add missing quotesTimothy Redaelli2011-12-23
| | | | | Signed-off-by: Timothy Redaelli <timothy.redaelli@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Allow comments after repo section header in pacman.confAllan McRae2011-12-23
| | | | | | | | | | | | | | 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>
* contrib/paccache: silence possible output from cdDave Reisner2011-12-12
| | | | | | | 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>
* pacsysclean: Add new contrib scriptEric Bélanger2011-12-12
| | | | | | | | | | 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>
* Use correct size in memsetDan McGee2011-12-05
| | | | | | | | 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>
* repo-add: enforce maximum .sig file sizeDan McGee2011-12-05
| | | | | | | | | | | | | 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>
* Enforce signature download size limit on -U <url> operationsDan McGee2011-12-05
| | | | | | | | We had a 16 KiB limit on database signatures, we should do the same here too to have a slight sanity check, even if we can't do so for the package itself yet. Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib/paclist: Add "--help" command line parameterLukas Fleischer2011-12-05
| | | | | | | | Be consistent with all other contrib scripts and support the "--help" command line switch. Fixes FS#27258. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg.5: fix typo s/tar,bz2/tar.bz2/Dave Reisner2011-11-30
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: avoid using comm for diff'ing package listsDave Reisner2011-11-30
| | | | | | | | | | | | Whereas comm will check inputs to see if they're sorted (and warn when they aren't), grep doesn't even care about ordering. In this particular instance -- neither do we. We're only interested that the two lists are equivalent. Fixes FS#26580. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* _alpm_ldconfig: return value from _alpm_run_chrootDan McGee2011-11-30
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Add two new pactests for pacman upgrade behaviorDan McGee2011-11-30
| | | | | | | | | | Both currently marked as failing. * sync303.py encapsulates the broken behavior reported in FS#27214. * sync304.py shows how packages depending on a specific version of a package in SyncFirst can cause breakage of the dependency resolver. Signed-off-by: Dan McGee <dan@archlinux.org>
* Miscellaneous post-4.0.1 updatesDan McGee2011-11-30
| | | | | | | Some late-arriving translation updates and add the correct dates to the index.txt releases table. Signed-off-by: Dan McGee <dan@archlinux.org>
* Final changes before 4.0.1 releaseDan McGee2011-11-20
| | | | | | | | * Add last-minute changes to NEWS * Don't treat '_' or '_n' special in scripts when finding translatable strings; this breaks with one use of `read` and a dummy _ variable Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: trim trailing space from whitespace sensitive varsDave Reisner2011-11-20
| | | | | | | | | | | | This applies to pkgver, pkgrel, and epoch and ensures that any trailing whitespace outside of the context of the variable declaration itself is properly trimmed. The Bash parser will ignore this, and so should we. We don't need to worry about leading space because it would force a syntax error, or fail validation. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>