summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2012-02-13Do not check for ALPM_ERR_PKG_INVALID_ARCH on remove operationAllan McRae1-6/+0
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>
2012-02-13testpkg: set gpgdirAllan McRae2-0/+5
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>
2012-02-13Move ROOTDIR definition into config.hAllan McRae2-2/+0
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>
2012-02-06Merge branch 'maint'Dan McGee33-204/+224
Conflicts: lib/libalpm/alpm_list.c
2012-02-06ALPM API adjustments for sanity and consistencyDan McGee10-32/+32
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>
2012-02-06Update translations from TransifexDan McGee28-190/+190
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>
2012-02-06remove.c: make "target not found" error consistent with sync.cAndrew Gregory1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-03Add simple integer-only pow() implementationDan McGee1-2/+13
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>
2012-02-03Fix FS#27924: don't display negative zeroesThomas Dziedzic4-13/+22
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>
2012-01-31Merge branch 'maint'Dan McGee28-221/+121
Conflicts: scripts/makepkg.sh.in
2012-01-31Update translationsDan McGee27-216/+120
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-31Update pot translation catalogsDan McGee1-5/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-23Merge branch 'maint'Dan McGee4-45/+29
Conflicts: lib/libalpm/diskspace.c src/pacman/util.h
2012-01-19Update copyright on changed files since beginning of yearDan McGee4-4/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-19Allow UseDelta option to specify a delta ratioDan McGee2-4/+17
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>
2012-01-19util.c, rmrf(): only create string when neededOlivier Brunel1-3/+3
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>
2012-01-19Fix missing [removal] outputAllan McRae1-1/+5
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>
2012-01-19Fix broken output when asking question and stdin is pipedOlivier Brunel1-0/+6
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>
2012-01-18Remove unused strtoupper() functionDan McGee2-14/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-18Don't remove unknown files in cache cleaning codeDan McGee1-22/+10
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>
2012-01-12Use fileno() in isatty() callDan McGee1-1/+1
This was our only use of the function that had a hardcoded file descriptor. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-08Merge branch 'maint'Dan McGee5-29/+31
Conflicts: lib/libalpm/signing.c Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-07testdb: check local database for duplicate filesDan McGee1-7/+78
This adds an additional check step to find files in the local database that claim to be owned by more than one package at once, which is definitely not a supported setup. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-06Update translations from TransifexDan McGee5-29/+31
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-02Convert get_update_timediff to integer return valueDan McGee2-26/+28
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>
2011-12-23Convert strtrim/strlen paired calls to only strtrimDan McGee2-10/+11
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>
2011-12-23Merge branch 'maint'Dan McGee1-5/+7
2011-12-23pactree: cleanup register_syncsDave Reisner1-6/+9
- take advantage of the new strtrim return value - tighten scope on line pointer Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-12-23pactree: update with new strtrim functionDave Reisner1-9/+9
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-12-23pacman/util: return size_t from strtrimDave Reisner2-10/+10
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>
2011-12-23Allow comments after repo section header in pacman.confAllan McRae1-5/+7
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>
2011-12-22include config.h via MakefilesDave Reisner17-32/+8
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>
2011-12-12code syntax cleanupDave Reisner4-10/+10
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>
2011-12-12pacman: process all sync targets before exiting on errorDan McGee1-13/+27
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>
2011-12-12pacman: process all targets on upgrade operationDan McGee1-5/+15
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>
2011-12-12pacman: list all unknown targets on removal operationAllan McRae1-1/+4
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>
2011-12-01Merge branch 'maint'Dan McGee1-4/+4
2011-12-01Miscellaneous post-4.0.1 updatesDan McGee1-4/+4
Some late-arriving translation updates and add the correct dates to the index.txt releases table. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-21Merge branch 'maint'Dan McGee1-1/+2
2011-11-21add key algo to import msgFlorian Pritz1-2/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-21change gpg import message to resemble gpg --list-keysFlorian Pritz1-2/+6
Dan: const pointers, don't worry about bitfields. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-21Final changes before 4.0.1 releasev4.0.1Dan McGee1-1/+2
* 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>
2011-11-16Merge branch 'maint'Dan McGee28-507/+513
2011-11-16Update translations from TransifexDan McGee14-150/+163
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-15Remove unnecessary casts in callback codeDan McGee1-5/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-14create a typedef for enum _alpm_errno_tJonathan Conder9-11/+11
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>
2011-11-14Update translations from TransifexDan McGee27-410/+403
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-14Updates in preparation for 4.0.1 releaseDan McGee1-4/+4
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>
2011-11-13add fnmatch support for HoldPkgDave Reisner1-1/+7
Adds test remove031. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-07Merge branch 'maint'Dan McGee1-2/+5