summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Merge branch 'maint'Dan McGee2012-02-06
|\ | | | | | | | | Conflicts: lib/libalpm/alpm_list.c
| * makepkg.sh.in - if both -r and -i are provided, only remove makedepsAndrew Gregory2012-02-06
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update translations from TransifexDan McGee2012-02-06
| | | | | | | | | | | | | | The pacman-scripts catalog is omitted here due to various newline errors I don't have the time to fix right now. Signed-off-by: Dan McGee <dan@archlinux.org>
| * remove.c: make "target not found" error consistent with sync.cAndrew Gregory2012-02-06
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg.sh.in - fix remove_deps test for deps to be removedAndrew Gregory2012-02-06
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: add forgotten newline in help outputMantas Mikulėnas2012-02-06
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * pactest: check return code in some upgrade testsDan McGee2012-02-03
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Add simple integer-only pow() implementationDan McGee2012-02-03
| | | | | | | | | | | | | | | | 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>
| * Fix FS#27924: don't display negative zeroesThomas Dziedzic2012-02-03
| | | | | | | | | | | | | | 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>
| * makepkg: Fix non-writable SRCPKGDEST error messageAllan McRae2012-01-31
| | | | | | | | | | | | | | | | | | | | 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>
| * Fix rare segfault on package removalAllan McRae2012-01-31
| | | | | | | | | | | | | | | | | | | | 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>
* | ALPM API adjustments for sanity and consistencyDan McGee2012-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes several small adjustments to our exposed method names, and in one case, parameters. The justification here is to make methods less odd in their naming convention. If a method takes an alpm_db_t argument, the method should be named 'alpm_db_*', but perhaps more importantly, if it doesn't take a database as the first parameter, it should not. Summary of changes: alpm_db_register_sync -> alpm_register_syncdb alpm_db_unregister_all -> alpm_unregister_all_syncdbs alpm_option_get_localdb -> aplpm_get_localdb alpm_option_get_syncdbs -> aplpm_get_syncdbs alpm_db_readgroup -> alpm_db_get_group alpm_db_set_pkgreason -> alpm_pkg_set_reason All methods keep the same argument list except for alpm_pkg_set_reason; there we drop the 'handle' argument as it can be retrieved from the passed in package object. Signed-off-by: Dan McGee <dan@archlinux.org>
* | alpm.h: enum cleanups, comment formatting cleanupDan McGee2012-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't use trailing commas in enums if people really want to use a strict C89 compiler, and document why on earth one particular enum uses bitmask values when it doesn't seem necessary. With comments, shoot for more consistency. When something is a one-liner, keep it that way and move the whole /** sequence */ to one line. When it needs more than one line, ensure we format most of them in a similar fashion. Two minor function signature adjustments are made that don't change anything other than matching the parameter name (name -> filename) and fitting in with our coding style (type* var -> type *var). Signed-off-by: Dan McGee <dan@archlinux.org>
* | Remove last explicit include of config.hDan McGee2012-02-06
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-01-30
|\| | | | | | | | | Conflicts: scripts/makepkg.sh.in
| * Update translationsDan McGee2012-01-30
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update pot translation catalogsDan McGee2012-01-30
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * 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>
* | pacman-key: call gpg fewer times for revocation keysDave Reisner2012-01-30
| | | | | | | | | | | | | | | | | | Instead of iterating over the revocation keyfile and calling gpg once for each key, map the file into an array and call gpg once, iterating over this output to mark each key as revoked. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman-key: simplify trusted keyring iterationDave Reisner2012-01-30
| | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: check for license when creating srcpackageDave Reisner2012-01-23
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: abstract license check into separate functionDave Reisner2012-01-23
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | Remove rmrf implementation from backendDan McGee2012-01-23
| | | | | | | | | | | | | | | | | | This moves the code for removal of local database entries right into be_local.c, which was the last user of the rmrf() function we had in our utility source file. We can simplify the implementation and make it non-recursive as we know the structure of the local database entries. Signed-off-by: Dan McGee <dan@archlinux.org>
* | libalpm/deps.c: access trans flags directlyDan McGee2012-01-23
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-01-23
|\| | | | | | | | | | | Conflicts: lib/libalpm/diskspace.c src/pacman/util.h
| * 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>
* | Allow UseDelta option to specify a delta ratioDan McGee2012-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework the frontend and backend to allow passing a ratio value in for UseDelta rather than having a hardcoded #define-d 0.7 value always used. This is useful for those with fast connections, who would likely benefit from tuning this ratio to lower values; it is also useful for general testing purposes. The libalpm API changes for this, but we do support the old config file format with a no-value 'UseDelta' option; in this case we simply use the old default of 0.7. We clamp the ratio values to a sane range between 0.0 and 2.0, allowing ratios above 1.0 for testing purposes. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Reorder some operations in sig check for efficiencyDan McGee2012-01-12
| | | | | | | | | | | | | | | | We don't need to open the data to be checked if we don't have a signature to check against, so postpone that open until we know we have either the base64_data or a valid signature file. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-01-08
|\| | | | | | | | | | | | | Conflicts: lib/libalpm/signing.c Signed-off-by: Dan McGee <dan@archlinux.org>