summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* 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>
* 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>
* 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>
* Update translations from TransifexDan McGee2012-01-05
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* 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>
* 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>
* 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>
* 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>
* 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>
* src/util: link vercmp against .lo, not the .oDave Reisner2011-11-01
| | | | | | | This seems to fix FS#26652. Signed-off-by: Dave Reisner <dreisner@archlinux.org> 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>
* Table display: print message with warning: prefixDan McGee2011-10-17
| | | | | | Use the normal error functions here rather than a bare fprintf(). Signed-off-by: Dan McGee <dan@archlinux.org>
* Coding style cleanupsDan McGee2011-10-13
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* VerbosePkgLists: format table lines in i18n-compatible wayDan McGee2011-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This had the unfortunate implementation detail that depended on the strings having 1 byte == 1 column hold true. As we know, this is not at all the case once you move past the base ASCII character set. Reimplement this whole thing so it doesn't depend on format strings at all. Instead, simply calculate the max column widths, and then when displaying each row add the correct amount of padding using UTF-8 safe string length functions. Before: 名字 旧版本新版本 净变化 下载大小 libgee 0.6.2.1-1 0.60 MiB 0.10 MiB libsocialweb 0.25.19-2 1.92 MiB 0.23 MiB folks 0.6.3.2-1 1.38 MiB 0.25 MiB After: 名字 旧版本 新版本 净变化 下载大小 libgee 0.6.2.1-1 0.60 MiB 0.10 MiB libsocialweb 0.25.19-2 1.92 MiB 0.23 MiB folks 0.6.3.2-1 1.38 MiB 0.25 MiB Signed-off-by: Dan McGee <dan@archlinux.org>
* Final Transifex update before 4.0Dan McGee2011-10-12
| | | | | | | | We have a few incomplete translations, but these should be addressable before the 4.0.1 maint release that is surely not that far in the future. Signed-off-by: Dan McGee <dan@archlinux.org>
* Update translations from TransifexDan McGee2011-10-11
| | | | | | In prep for the 4.0.0 release. Signed-off-by: Dan McGee <dan@archlinux.org>
* pactree: Make error message smarter in register_syncs()Lukas Fleischer2011-10-10
| | | | | | | | | | | | | | | | | | | | Our error message used to be very unclear when the configuration file could not be found: $ ./pactree -lsr gtk error: failed to register sync DBs Instead, display an accurate message and include the file name: $ ./pactree -lsr gtk error: config file /usr/local/etc/pacman.conf could not be read Also, move the error message inside register_syncs() to allow for differentiating between different errors that might require a handler in the future. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
* pactree: Add "--config" optionLukas Fleischer2011-10-10
| | | | | | | | | | | | | | | | This allows for specifying an alternate configuration file path, similar to pacman's "--config" option. Given that there is currently no other way to tell pactree to read from another configuration file (except for patching or symlinking), this seems totally sensible - even if there are plans to refactor and/or replace the standalone configuration file parser. We do not define a short option for the sake of consistency with pacman's set of command line options. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
* Update translation message catalogs in prep for 4.0 releaseDan McGee2011-10-05
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update translations from TransifexDan McGee2011-10-05
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove redundant transaction size outputAllan McRae2011-09-30
| | | | | | | | | | | | | | | | | | | Printing all of "Installed", "Removed" and "Net Upgrade" sizes is redundant as the difference of the first two is the last. Instead, only print "Installed Size" and "Net Upgrade Size" when both the installed and removed are non-zero. This results in the following output in the following cases: - package installation only: Installed Size - package removal only: Removed Size - package installation involving replacement: Installed + Net Upgrade Size - package upgrade: Installed + Net Upgrade Size - combination upgrade and installation: Installed + Net Upgrade Size Download Size remains outputted whenever something is downloaded. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove redundant "removal" output in pure remove operationAllan McRae2011-09-29
| | | | | | | Printing "[removal]" beside all package names is redundant when all packages are being removed (i.e. when using -R). Signed-off-by: Allan McRae <allan@archlinux.org>
* Refactor display_targets to not be recursiveDan McGee2011-09-28
| | | | | | | | | | | This also fixes a memory leak and makes the dual-purpose "rows" variable go away in favor of storing the rows and non-verbose names separately. This also fixes some potential memory leaks and/or wrong behavior due to the config->verbosepkglists flag being flipped, which we should never be doing. Signed-off-by: Dan McGee <dan@archlinux.org>
* verbose package lists: remove errant debuggerDan McGee2011-09-28
| | | | | | Left this in as part of the last set of commits, whoops. Signed-off-by: Dan McGee <dan@archlinux.org>
* Always show download size if -w/--downloadonly was providedDan McGee2011-09-28
| | | | | | | The prompt can be rather confusing otherwise when all files have already been downloaded, but there is not a single total size listed. Signed-off-by: Dan McGee <dan@archlinux.org>
* Table format creation code cleanupDan McGee2011-09-28
| | | | | | | | | Better scoping of variables for the most part, and ensure we are using string_length() and not strlen() as appropriate. Also refactor the longest cell code to call string_length() a lot less; by simply using an array of max sizes we don't have to recompute values nearly as much. Signed-off-by: Dan McGee <dan@archlinux.org>
* Use unsigned types for indent width and column countDan McGee2011-09-28
| | | | | | | | | | | For getcols(), the functions we call return a value of type 'unsigned short', so it makes sense for us to do the same. string_length() is meant to behave like strlen(), so it should return type size_t. This exposes other functions such as indentprint() which should also be using signed return types. Signed-off-by: Dan McGee <dan@archlinux.org>
* Show download sizes when using -S/--syncDan McGee2011-09-28
| | | | | | | | We now label the old 'Size' column as 'Net Change' to reflect the reality of what we are looking at. Sync operations now get an additional 'Download Size' column. Signed-off-by: Dan McGee <dan@archlinux.org>
* Keep track of explicitly added and removed packagesDan McGee2011-09-28
| | | | | | | This allows us to sort the output list by showing all pulled dependencies first, followed by the explicitly specified targets. Signed-off-by: Dan McGee <dan@archlinux.org>
* Combine add and removal package list displayDan McGee2011-09-28
| | | | | | There was no real reason for these to be done separately. Signed-off-by: Dan McGee <dan@archlinux.org>
* Avoid comparison between signed and unsigned typesAllan McRae2011-09-26
| | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Revamp pacman signal handlerDan McGee2011-09-26
| | | | | | | | | | | * All errors now go to stderr, so do the same here and simplify the writing of the error message. * Add SIGHUP to the handled signal list, and don't repeat code. * Attempt to release the transaction (e.g. remove the lock file) for all of HUP, INT, and TERM. Signals HUP and INT respects transaction state, TERM will immediately terminate the process. Signed-off-by: Dan McGee <dan@archlinux.org>
* Regenerate message catalogs and translationsDan McGee2011-09-22
| | | | | | We've had a bit of churn since the last time this was done. Signed-off-by: Dan McGee <dan@archlinux.org>
* Translation file updates from TransifexDan McGee2011-09-22
| | | | | | | Pick up any updates before I push new source messages out to the service. Signed-off-by: Dan McGee <dan@archlinux.org>
* Add status and check for key being disabledDan McGee2011-09-22
| | | | | | | | | | Because we aren't using gpgv and a dedicated keyring that is known to be all safe, we should honor this flag being set on a given key in the keyring to know to not honor it. This prevents a key from being reimported that a user does not want to be used- instead of deleting, one should mark it as disabled. Signed-off-by: Dan McGee <dan@archlinux.org>
* Add new import key question enum value and stub frontend functionDan McGee2011-09-22
| | | | | | | | This is for eventual use by the PGP key import code. Breaking this into a separate commit now makes the following patches a bit easier to understand. Signed-off-by: Dan McGee <dan@archlinux.org>