summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/util.c2
-rw-r--r--scripts/makepkg.sh.in4
-rw-r--r--src/pacman/callback.c7
3 files changed, 8 insertions, 5 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 57869d3b..cbc5bdfb 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -217,7 +217,7 @@ char *_alpm_strtrim(char *str)
size_t _alpm_strip_newline(char *str)
{
size_t len;
- if(str == '\0') {
+ if(*str == '\0') {
return 0;
}
len = strlen(str);
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 3085bf59..5d048d28 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -334,7 +334,7 @@ in_array() {
source_has_signatures(){
local file
for file in "${source[@]}"; do
- if [[ $file = *.@(sig|asc) ]]; then
+ if [[ $file = *.@(sig?(n)|asc) ]]; then
return 0
fi
done
@@ -704,7 +704,7 @@ check_pgpsigs() {
for file in "${source[@]}"; do
file="$(get_filename "$file")"
- if [[ ! $file = *.@(sig|asc) ]]; then
+ if [[ ! $file = *.@(sig?(n)|asc) ]]; then
continue
fi
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 6f39013f..14d80486 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -699,8 +699,11 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total)
xfered_human = humanize_size(xfered, '\0', &xfered_label);
printf(" %ls%-*s ", wcfname, padwid, "");
- /* We will show 1.6M/s, 11.6M/s, but 116K/s and 1116K/s */
- if(rate_human < 100.0) {
+ /* We will show 1.62M/s, 11.6M/s, but 116K/s and 1116K/s */
+ if(rate_human < 9.995) {
+ printf("%6.1f %3s %4.2f%c/s ",
+ xfered_human, xfered_label, rate_human, rate_label[0]);
+ } else if(rate_human < 99.95) {
printf("%6.1f %3s %4.1f%c/s ",
xfered_human, xfered_label, rate_human, rate_label[0]);
} else {