aboutsummaryrefslogtreecommitdiffstats
path: root/src/print.c
Commit message (Collapse)AuthorAgeFilesLines
* modifications for the previous commit in error message handlingTimo Teräs2015-04-241-3/+3
| | | | forgot to --amend my changes
* print.c: provide more detailed error messages if retrieving a package failsAlex Dowad2015-04-221-1/+19
| | | | | | | | | | | | fetch_maperror() translates error codes returned by libfetch to our error codes. Handle those in apk_error_str(), returning error messages which advise the user of the most likely fix. A custom error code, EAPKSTALEINDEX, has been added for cases where retrieving a package fails due to a HTTP error 404 or similar. [TimoT: add also EAPKBADURL, as well as organize a bit better where the EAPKSTALEINDEX is generated]
* print: flush on apk_logNatanael Copa2013-12-051-0/+1
| | | | Makes it more useful whith pipes.
* print: use stdout instead of stderr for logging and progressTimo Teräs2013-10-111-10/+10
| | | | | | stdout is the proper place for it. this also fixes the progress bar in musl, which seems to not support using line buffering for stderr.
* print: move progress bar update logic to apk_print_progressNatanael Copa2013-06-191-22/+39
| | | | | | | | | | | | | | | | | | | - let the apk_print functions deal with the forced print itself. We avoid that the callbacks need to deal with the force flag. We can also get rid of the APK_PRINT_PROGRESS_* defines. - let the reader of --progress-fd decide how often things are updated rather than having a fixed granularity off 1/100 (percent) - avoid detect screen size and percent/bar calculations in case the --no-progress was given - track satistics for both the ascii bar and percent info and update bar only if either percent or bar changes. This makes the bar go smoother when width is wider than 100 chars and it makes the percent counter go smooth when screen width is less thann 100 chars. It also simplifies the callbacks as they no longer need to deal with update granularity.
* print: percent arg for process_fd is integerNatanael Copa2013-06-191-1/+1
| | | | | | With commit 0a131418899436b58a163978176d99c08cbddb0c the percent variable became an integer instead of size_t. We fix the format modifier accordingly.
* print: move progress printing to common functionsTimo Teräs2013-06-171-0/+32
|
* db: refactor repository file constructionTimo Teräs2013-06-171-0/+2
| | | | | Fixes also 'fetch' applet to prefer copying/linking to files from cache if possible.
* errors: rewrite the logic how errors are reportedTimo Teräs2013-06-131-0/+12
| | | | | | | Instead of the dependency oriented logic, switch to print them for each package or name needed. Might give a bit more readable errors now. There's still few corner cases that proper error is not output, which are cought by the test cases.
* print: minimum screen width of 50Timo Teräs2012-02-101-2/+3
|
* all: update copyright year statementTimo Teräs2011-09-131-1/+1
|
* print: minor cleanup to indented writerTimo Teräs2011-09-091-5/+6
|
* apk: improve indented printingTimo Teräs2011-07-221-3/+22
| | | | | * fixup the help messages to align up properly * refresh screen width on SIGWINCH
* various: use 'atoms' for certain package field and misc fixesTimo Teräs2010-12-141-1/+1
| | | | | | | - implement a hash table for commonly shared fields such as license, version and architecture - use macroes to print blobs or pkgname-pkgver strings - fix some old cruft
* io: enhance istream/bstreams with pipe to forked childTimo Teräs2010-12-091-1/+1
| | | | | * prunes the child pid to avoid zombies * handles the errors so e.g. file-not-found is reported properly
* print: clean up after copy-pasteNatanael Copa2010-06-111-1/+1
|
* First steps for libapkNatanael Copa2010-06-111-0/+70