summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* makepkg: rework libprovidesAllan McRae2012-02-20
| | | | | | | | | | | | | | | | | | | | This reworks the implmentation of libprovides for the following benefits: - Moves functionality from write_pkginfo() to find_libprovides() - Only calculates the version for libraries specifically requested and not all libraries. This has the disadvantage of running find over the $pkgdir for as many libraries as needed, but is unlikely to be an issue due to caching. - The order of the provides array in the PKGBUILD is kept in the package - There are more warning messages when things fail and those that were there are no longer errors (as I do not think failure of libprovides should result in complete packaging failure) - It is now modular so can be easy extended to other library types other than ELF *.so. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* util: reduce pointer hell in _alpm_makepath_modeDave Reisner2012-02-20
| | | | | | | | | | | | Simplify the implementation: - allocate and manipulate a copy of the passed in path rather than building out a path as the while loop progresses - use simple pointer arithmetic to skip uninteresting cases - use mkdir(3)'s return value and errno to detect failure Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Print error message when to-be-downloaded file cannot be createdNagy Gabor2012-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can happen that the to-be-downloaded file cannot be created in cachedir. For example, I am an -Sup user, and it is comfortable to set --cachedir to /mnt/pendrive, which is a FAT filesystem, so files like capseo-1:0.3-2-i686.pkg.tar.xz cannot be downloaded to there. Before this patch, pacman didn't give clear output about what happens when the download code could not create the necessary file. This can be confusing with -Su. An example output: *** $ sudo pacman -S capseo bochs --cachedir /c/TEMP resolving dependencies... looking for inter-conflicts... Targets (2): bochs-2.4.6-1 capseo-1:0.3-2 Total Download Size: 0.61 MiB Total Installed Size: 2.61 MiB Proceed with installation? [Y/n] :: Retrieving packages from extra... warning: failed to retrieve some files from extra bochs-2.4.6-1-i686 611.5 KiB 118K/s 00:05 [------------------] 97% error: failed to commit transaction (unexpected error) Errors occurred, no packages were upgraded. *** After the patch, pacman will give more informative error message (and pm_errno is set properly): *** error: could not open file '/c/TEMP/capseo-1:0.3-2-i686.pkg.tar.xz.part': Invalid argument error: failed to commit transaction (failed to retrieve some files) *** Unfortunately, the "could not open file" error message is printed for every mirror (that can be dozens of lines), which is ugly, but at least informative... Without modifying the download logic (for example, by introducing -2 return value for _alpm_download() to indicate giving up), this ugliness cannot be eliminated. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2012-02-13
|\ | | | | | | | | | | Conflicts: lib/libalpm/sync.c src/util/pactree.c
| * lib/sync: use full delta size as max download sizeDave Reisner2012-02-13
| | | | | | | | | | | | | | | | | | | | The max filesize for a delta download must be the full size of the delta file, not just what's remaining. Fixes FS#28345 Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * 4.0.2 release updatesDan McGee2012-02-11
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Final pre-release Transifex updatesDan McGee2012-02-11
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * pactree: allow comments after repo section headerAllan McRae2012-02-11
| | | | | | | | | | | | | | Duplicate the fix in config file parsing from d95c0494. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: disable extglob when sourcing BUILDSCRIPTAllan McRae2012-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | PKGBUILDs are advertised as being pure bash so it would be expected that the default bash options are in effect when sourcing it. This inadvertantly "fixes" FS#27780 where enabling extglob causes the bash parser to error on non-valid bash function names like package_libxml++(). Note that these function names are unsupported in bash and could break again even with this "fix" in future bash releases. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: deal with mercurial exit codesAllan McRae2012-02-11
| | | | | | | | | | | | | | | | | | From mercurial-2.1, "hg pull" returns 1 when there are no updates. Catch the return code and either pull the update or return an error as appropriate. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Fix a handful of comment typos or misspellingsDan McGee2012-02-06
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Translation updates from Transifex, mostly scriptsDan McGee2012-02-06
| | | | | | | | | | | | | | This is after some manual massaging to fix issues with newlines in some translations of the script catalogs. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Use AM_PATH_GPGME macro from gpgme instead of home-built gpgme detection.Nathan Phillip Brink2012-02-13
| | | | | | | | | | | | | | | | | | | | | | Fixes compilation on Gentoo, where CPPFLAGS=-I/usr/include/gpgme is necessary. The AC_SYS_LARGEFILE macro call has to be before the GPGME checks, otherwise the GPGME header gives an error about ABI incompatibilities. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add gpgme m4 autoconf macro fileAllan McRae2012-02-13
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Do not check for ALPM_ERR_PKG_INVALID_ARCH on remove operationAllan McRae2012-02-13
| | | | | | | | | | | | | | | | alpm_trans_prepare can not return ALPM_ERR_PKG_INVALID_ARCH on a remove operation so there is no point in checking for it. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | testpkg: set gpgdirAllan McRae2012-02-13
| | | | | | | | | | | | | | | | Without setting gpgdir, testpkg outputs: warning: Public keyring not found; have you run 'pacman-key --init'? Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Reset errno before opening archiveAllan McRae2012-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set errno to 0 at the start of _alpm_open_archive as it is not set when archive_read_open_fd fails. This can result in _alpm_pkg_load_internal thinking errno == ENOENT and setting the wrong pm_errno. e.g. Before: > testpkg pacman-4.0.1-4-i686.pkg.tar.gz.sig error: could not open file pacman-4.0.1-4-i686.pkg.tar.gz.sig: Unrecognized archive format Cannot find the given file. After: > testpkg pacman-4.0.1-4-i686.pkg.tar.gz.sig error: could not open file pacman-4.0.1-4-i686.pkg.tar.gz.sig: Unrecognized archive format Cannot open the given file. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Move ROOTDIR definition into config.hAllan McRae2012-02-13
| | | | | | | | | | | | | | | | This was the only variable of its kind when a define was done on the compiler command line. Move it into config.h instead. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Allow specifying shell for running scriptletsAllan McRae2012-02-13
| | | | | | | | | | | | | | | | | | | | | | | | Some distributions insist on using bash specific commands in their install scripts under the assumption that "sh" is a symlink to bash. This can causes issues if (e.g.) their users what to change sh to point at another shell, such as dash, that does not support these features. Add a configure option to explicitly set the shell being used to run install scripts. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | use _alpm_access in a few more places for increased debugging infoFlorian Pritz2012-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | pacman -U <pkg> returns a bogus "could not find or read package" if the file is on a fuse file system that doesn't allow root access. Debug output isn't very helpful here either so we should log why the access check failed. The other 2 checks already log something when failing so logging a more specific error won't hurt either. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
* | 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>