summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Add a progressbar for package integrity checkingDan McGee2011-01-11
| | | | | | | This can take a while too, and it is really easy to add the necessary callback stuff for adding a progressbar. Signed-off-by: Dan McGee <dan@archlinux.org>
* Small fix to download size lookup and a loggerDan McGee2011-01-11
| | | | | | | | These were just two small things I came across today and found could be fixed or helpful, so I've added them and I'm not sure what else to bundle them with. commit_count++ Signed-off-by: Dan McGee <dan@archlinux.org>
* pactest: correctly write epoch and force as necessaryDan McGee2011-01-10
| | | | | | | We were missing this in a few places; also add the ability to check the outcome via a new rule type. Signed-off-by: Dan McGee <dan@archlinux.org>
* Use double rather than float everywhereDan McGee2011-01-10
| | | | | | No real need to use the smaller floating point types here. Signed-off-by: Dan McGee <dan@archlinux.org>
* Progress callback cleanups and fixesDan McGee2011-01-10
| | | | | | | | * Remove a stale comment * Fix a logic error- the conditional disagreed with the comments * Remove some unnecessary floating point casts Signed-off-by: Dan McGee <dan@archlinux.org>
* Ensure we use local package when calculating removed sizeDan McGee2011-01-10
| | | | | | | | | | | We were checking if a package existed locally, but then using the incoming package to calculate removed size rather than the currently installed package. Also adjust the local variable in the replaces loop to make it more clear that we are always dealing with local packages here. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove need for floating point division in backendDan McGee2011-01-10
| | | | | | | | | | | All of these can be done with integer division; the only slightly interesting part is ensuring we round up like before with calling the ceil() function. We can also remove the math library from requirements; now that the only ceil() calls are gone, we don't need this anymore. Signed-off-by: Dan McGee <dan@archlinux.org>
* libalpm/be_package.c: fix small memleakXavier Chantry2011-01-07
| | | | | | | | | | file_pkg_ops can be a static struct like in other backends, we just need to initialize it at some point. Dan: add initialization flag. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix some more simple conversion "errors"Dan McGee2011-01-07
| | | | | | | | None of these warn at the normal "-Wall -Werror" level, but casts do occur that we are fine with. Make them explicit to silence some warnings when using "-Wconversion". Signed-off-by: Dan McGee <dan@archlinux.org>
* Use size_t for alpm_list sizesAllan McRae2011-01-07
| | | | | | | | | | | | | There is a lot of swtiching between size_t and int for alpm_list sizes in the codebase. Start converting these to all be size_t by adjusting the return type of alpm_list_count and fixing all additional warnings given by -Wconversion that are generated by this change. Dan: a few more small changes to ensure things compile, adjusting some printf format string characters to accommodate the larger size on x86_64. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Refactor old date parsing into single methodDan McGee2011-01-07
| | | | | | | We've managed to duplicate this four times at this point, so make it a method in util.c instead. Signed-off-by: Dan McGee <dan@archlinux.org>
* Update copyright years for 2011Allan McRae2011-01-07
| | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* vercmp: always return 0 if we perform a compareDan McGee2011-01-05
| | | | | | | | | And change the wording slightly to indicate we *print* a value, not *return* it. You can't return negative values (they get coerced to 255), so it isn't worth it to try and cram the result into the return code. Acked-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove FORCE reading from local DBDan McGee2011-01-05
| | | | | | We never wrote it here, so no need to read it in either. Signed-off-by: Dan McGee <dan@archlinux.org>
* pactest: Use booleans where it makes senseDan McGee2011-01-05
| | | | | | No need to use 0/1 when we can use False/True for the force option. Signed-off-by: Dan McGee <dan@archlinux.org>
* pactest: remove dead functionDan McGee2011-01-05
| | | | | | Stopped being used after commit fa933df65b9. Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix function indentationDan McGee2011-01-02
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2010-12-30
|\ | | | | | | | | | | Conflicts: lib/libalpm/sync.c test/pacman/tests/ignore007.py
| * Respect Ignore{Pkg,Group} for group membersJakob Gruber2010-12-30
| | | | | | | | | | | | Fixes FS#19854. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Move group code to separate functionJakob Gruber2010-12-30
| | | | | | | | | | | | | | This makes the following commits more readable. No logic was changed in this commit. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Tests: Sync group which includes ignored pkgsJakob Gruber2010-12-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * FS#19854 (--ignore is ignored with groups) * http://www.archlinux.org/pipermail/pacman-dev/2009-June/008847.html (operation aborts when a package from a group is ignored/and user chooses not to install it) If a group member is ignored, we expect a) a question whether to install b) after saying 'no' to a), the ignored member not to be installed c) all other group members to be installed d) pacman to execute successfully Signed-off-by: Dan McGee <dan@archlinux.org> (cherry picked from commit 9d0b33fd3327ae6d2b15f50870c0885a2068d492)
| * doc: add website zip to clean filesDan McGee2010-12-29
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Declare all local functions staticAllan McRae2010-12-30
| | | | | | | | | | | | | | | | | | | | | | | | All functions that are limited to the local translation unit are declared static. This exposed that the _pkg_get_deltas declaration in be_local.c was being satified by the function in packages.c which when declared static caused linker failures. Fixes all warnings with -Wmissing-{declarations,prototypes}. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add const to some ALPM function signaturesJakob Gruber2010-12-30
| | | | | | | | | | | | char * -> const char *. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2010-12-29
|\|
| * Various documentation updatesDan McGee2010-12-29
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: add option to clear buildflagsAllan McRae2010-12-29
| | | | | | | | | | | | | | | | | | | | Add the "buildflags" option, which is useful in its negative form for disabling CFLAGS, CXXFLAGS and LDFLAGS when building a package. This is useful when determining of one of these flags is causing an issue with a package. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: Add check() function for running test suitesAllan McRae2010-12-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A PKGBUILD can have an option check() function for running test suites between the build() and package() stages. This function is run by default but can be disabled globally in with "!check" in BUILDENV in makepkg.conf. This setting can be controlled on an individual package basis using makepkg's --check and --nocheck flags. Addition dependencies needed for running the test suite can be specified in the checkdepends array and are only checked when running the check() function. Original-work-by: Jeff C <jeff@kcaccess.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Use limits.h for PATH_MAXAllan McRae2010-12-29
| | | | | | | | | | | | | | | | | | | | | | | | We use PATH_MAX everywhere by including limits.h so there is no point in doing a check for it in a different header when dealing with FreeBSD's libfetch. Also, remove autoconf check for strings.h header as it is not used anywhere. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Detect undefined PATH_MAXAllan McRae2010-12-29
| | | | | | | | | | | | | | | | | | | | | | | | | | POSIX does not require PATH_MAX be defined when there is not actual limit to its value. This affects HURD based systems. Work around this by defining PATH_MAX to 4096 (as on Linux) when this is not defined. Also, clean up inclusions of limits.h and remove autoconf check for this header as we do not use macro shields for its inclusion anyway. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Correct type for hash value storageAllan McRae2010-12-29
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: escape closing bash array paren for awkDave Reisner2010-12-29
| | | | | | | | | | | | | | | | | | | | | | The closing parenthesis of bash arrays needs to be escaped in the ending address of awk expressions in order to play nicely with implementations of awk other than gawk. This change provides compatibility with gawk, nawk and mawk. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: allow pkgname usage in split package functionsAllan McRae2010-12-29
| | | | | | | | | | | | | | | | | | | | | | | | Currently, using $pkgname in a split package package_*() function always returns the first value in the pkgname array rather than the name of tha package being packaged. Fix this so $pkgname gives the expected value. Fixes FS#22174 Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'depcmp-perf'Dan McGee2010-12-29
|\ \
| * | Use name hashes in depends to avoid strcmp callsDan McGee2010-12-21
| | | | | | | | | | | | | | | | | | | | | | | | Just like we did for package name comparsions, if we add a depend name_hash field on depend struct initialization, we can use it instead of doing a string name comparison, saving us a lot of checks in the depcmp code. Signed-off-by: Dan McGee <dan@archlinux.org>
| * | Remove need for memory allocation in _alpm_depcmpDan McGee2010-12-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Noticed when tweaking testdb, when we run _alpm_depcmp in loops and call it seven million times, the strdup()/free() combo can add up. Remove the need for any string duplication by some pointer manipulation and use of strncmp instead of strcmp. Also kill the function logger and add an escape so we don't needlessly retrieve the list of provides. Signed-off-by: Dan McGee <dan@archlinux.org>
* | | Merge branch 'fgets-perf'Dan McGee2010-12-29
|\ \ \ | |/ / |/| |
| * | Add pactest to test long archive readsDan McGee2010-12-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | This creates two packages with extremely long description lines (500KB and 600 KB), causing our archive read code to perform reallocation to store the whole contents. One of the packages will successfully read while the other will fail for the time being. Signed-off-by: Dan McGee <dan@archlinux.org>
| * | pactest: allow testing of package descriptionDan McGee2010-12-21
| | | | | | | | | | | | | | | | | | | | | And modify the code to not print the full rule string if it is more than 40 characters long; truncate it instead. Signed-off-by: Dan McGee <dan@archlinux.org>
| * | Overhaul archive fgets functionDan McGee2010-12-21
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old function was written in a time before we relied on it for nearly every operation. Since then, we have switched to the archive backend and now fast parsing is a big deal. The former function made a per-character call to the libarchive archive_read_data() function, which resulted in some 21 million calls in a typical "load all sync dbs" operation. If we instead do some buffering of our own and read the blocks directly, and then find our newlines from there, we can cut out the multiple layers of overhead and go from archive to parsed data much quicker. Both users of the former function are switched over to the new signature, made easier by the macros now in place in the sync backend parsing code. Performance: for a `pacman -Su` (no upgrades available), _alpm_archive_fgets() goes from being 29% of the total time to 12% The time spent on the libarchive function being called dropped from 24% to 6%. This pushes _alpm_pkg_find back to the title of slowest low-level function. Signed-off-by: Dan McGee <dan@archlinux.org>
* | testdb: update for new database formatDan McGee2010-12-20
| | | | | | | | | | | | | | | | | | Sync DB's no longer have an extracted directory, so remove the files check for those. Local databases no longer have a 'depends' file, so kill that check as well. Finally, do a little other cleanup and remove the need for PATH_MAX. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Only check diskspace availability if needs more than zeroAllan McRae2010-12-20
| | | | | | | | | | | | | | | | | | | | The amount of diskspace needed for a transaction can be less than zero. Only test this against the available disk space if it is positive, which avoids a comparison being made between signed and unsigned types (-Wsign-compare). Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Always specify arguement type in function delcarationsAllan McRae2010-12-20
| | | | | | | | | | | | | | | | Always declare a function with (void) rather than () when we expect no arguements. Fixes all warnings with -Wstrict-prototypes. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: remove last inappropriate PKGBUILD usageAllan McRae2010-12-20
| | | | | | | | | | | | | | | | We should always use $BUILDSCRIPT instead of PKGBUILD. The only remaining uses of PKGBUILD in makekg are in comments. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Use macros in sync DB parsingDan McGee2010-12-20
| | | | | | | | | | | | | | | | | | | | This simplifies a lot of the repetative code and makes it obvious where the tricky or different ones are (e.g. depends, dates). It also makes it significantly easier to change the way this code works in the future. There should be no functional change with this patch. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2010-12-15
|\|
| * doc/PKGBUILD: document that functions run in -e modeDan McGee2010-12-13
| | | | | | | | | | | | | | Caught this noted on the forums, but it is definitely worth a note in the manpage as well. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Fix manpage wrap not at 80 charactersDan McGee2010-12-13
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update news and bump versionsDan McGee2010-12-12
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add a cushion for diskspace checkingDan McGee2010-12-15
| | | | | | | | | | | | It is the minimum of 5% of disk capacity or 20 MiB on a per-partition basis. Signed-off-by: Dan McGee <dan@archlinux.org>