summaryrefslogtreecommitdiff
path: root/src/pacman
Commit message (Collapse)AuthorAge
* Merge branch 'maint'Dan McGee2012-02-06
|\ | | | | | | | | Conflicts: lib/libalpm/alpm_list.c
| * 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>
| * 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>
* | 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>
* | 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>
* | Merge branch 'maint'Dan McGee2012-01-23
|\| | | | | | | | | | | Conflicts: lib/libalpm/diskspace.c src/pacman/util.h
| * 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>
| * 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>
| * 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>
| * 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>
* | Merge branch 'maint'Dan McGee2012-01-08
|\| | | | | | | | | | | | | Conflicts: lib/libalpm/signing.c Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update translations from TransifexDan McGee2012-01-05
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Convert get_update_timediff to integer return valueDan McGee2012-01-02
| | | | | | | | | | | | | | | | | | We don't need absolute floating point precision at all here; we can stick to integer land and use milliseconds which are precise enough for our purposes. This also removes most floating point math out of the non-update code path. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Convert strtrim/strlen paired calls to only strtrimDan McGee2011-12-23
| | | | | | | | | | | | | | This utilizes the new return value so we don't have to find the length of the string again. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-12-23
|\|
| * 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>
* | pacman/util: return size_t from strtrimDave Reisner2011-12-23
| | | | | | | | | | | | | | | | Instead of returning the same value as the parameter to this function, return the length of the string, which can be useful to the caller when its non-zero (e.g. to find the end of the string). Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | include config.h via MakefilesDave Reisner2011-12-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensures that config.h is always ordered correctly (first) in the includes. Also means that new source files get this for free without having to remember to add it. We opt for -imacros over -include as its more portable, and the added constraint by -imacros doesn't bother us for config.h. This also touches the HACKING file to remove the explicit mention of config.h as part of the includes. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | code syntax cleanupDave Reisner2011-12-12
| | | | | | | | | | | | | | As per HACKING file, we use 'CTRL(' rather than 'CTRL (' Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman: process all sync targets before exiting on errorDan McGee2011-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If someone specifies a bogus line such as pacman -S baz adsf/boo base-devel we are better off trying to process all targets and showing all relevant errors before exiting. This is easier in -U and -R operations where we aren't dealing with groups, but here we attempt to skip group selection once we know a target has errored to avoid cluttering the output and hiding the real problem. Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman: process all targets on upgrade operationDan McGee2011-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If an early target fails, we stopped processing the rest of the list. We should continue all the way through and show relevant errors for each target if possible, and error out only at the end. We do process all targets to check for URLs first and will error out if some could not be processed; we then do a second loop and try to load each target specified on the command line. This mirrors a patch by Allan to do the same for removal operations. Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman: list all unknown targets on removal operationAllan McRae2011-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a removal operation, pacman currently reports an error for the package that is not found in the database and then exists. Adjust so that all unknown packages are reported. Before: > pacman -R foo bar error: 'foo': target not found After: > pacman -R foo bar error: 'foo': target not found error: 'bar': target not found Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-11-30
|\|
| * 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>
* | Merge branch 'maint'Dan McGee2011-11-20
|\|
| * 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>
* | add key algo to import msgFlorian Pritz2011-11-20
| | | | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
* | change gpg import message to resemble gpg --list-keysFlorian Pritz2011-11-20
| | | | | | | | | | | | | | Dan: const pointers, don't worry about bitfields. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-11-16
|\|
| * Update translations from TransifexDan McGee2011-11-16
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update translations from TransifexDan McGee2011-11-13
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Updates in preparation for 4.0.1 releaseDan McGee2011-11-13
| | | | | | | | | | | | | | Bump the version, update the translation template files, and fill in NEWS with relevant commits and changes since 4.0.0. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Remove unnecessary casts in callback codeDan McGee2011-11-15
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | create a typedef for enum _alpm_errno_tJonathan Conder2011-11-14
| | | | | | | | | | | | | | | | This is consistent with the other enums and structs, and should be slightly more readable. Signed-off-by: Jonathan Conder <jonno.conder@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | add fnmatch support for HoldPkgDave Reisner2011-11-13
| | | | | | | | | | | | Adds test remove031. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-11-07
|\|
| * Fix download progress rounding edge caseDan McGee2011-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | Allan's original message: Occasionally when the download rate showed 100.0 the output got messed up. This was caused by the rounding of a number between 99.95 and 100. Adjust the threshold to avoid this rounding issue. Dan: make this fix, but also show values between 0 and 9.995 with two decimal places since we have the room. Original-fix-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add OPEN() and CLOSE() util macrosDan McGee2011-11-01
| | | | | | | | | | | | | | These wrap the normal open() and close() low-level I/O calls and ensure EINTR is handled correctly. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-10-21
|\| | | | | | | | | | | | | Conflicts: src/pacman/package.c Signed-off-by: Dan McGee <dan@archlinux.org>
| * Remove remaining usages of fprintf() from frontendDan McGee2011-10-21
| | | | | | | | | | | | | | These can either be replaced with pm_printf() if they are error related, or in the fprintf(stdout, ...) case a bare printf() will do. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Remove pm_fprintf() in favor of pm_printf()Dan McGee2011-10-21
| | | | | | | | | | | | | | | | | | | | Now that pm_printf() always prints to stderr, we don't need this second function that was always used with stderr as the first argument. Thus, this patch removes the function and makes the following sed replacement: sed -i -e 's#pm_fprintf(stderr, #pm_printf(#g' src/pacman/*.c Signed-off-by: Dan McGee <dan@archlinux.org>
| * Use stderr as output stream for pm_printf()Dan McGee2011-10-21
| | | | | | | | | | | | | | | | | | | | | | This matches what we now do in our backend callback function- all debug/info/warning/error/etc. messages should be on stderr. These are all the messages with a "warning:" or other type prefix, so does not affect general pacman output. This should fix the output confusion noted in FS#26555. Signed-off-by: Dan McGee <dan@archlinux.org>