diff options
author | Dan McGee <dan@archlinux.org> | 2011-06-14 08:29:39 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-14 08:29:39 -0500 |
commit | fbb44a6e0d5d3c386420dded0442f4771dbaea7c (patch) | |
tree | e704eb9c6debe0cf600f2a8f65cd50b8ddce9e14 | |
parent | 00a1b1deeb390d99c99d942ef4d8bfe1a943b02a (diff) | |
parent | 07e97a5f2c1e1039f35a7893d2be6abf07af690a (diff) |
Merge branch 'maint'
Conflicts:
doc/makepkg.conf.5.txt
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | doc/makepkg.conf.5.txt | 2 | ||||
-rw-r--r-- | src/pacman/util.c | 19 |
3 files changed, 15 insertions, 9 deletions
@@ -5,8 +5,9 @@ VERSION DESCRIPTION - --print should not enable --noconfirm (FS#24287) - fix default path substitution in documentation - makepkg: quote variables that may contain spaces (FS#24002) + - makepkg: fix creation of source package with -p (FS#24567) - repo-add: include dotfiles in filelists (FS#24534) - - minor translation updates: de, fi, sk + - minor translation updates: de, fi, fr, sk, zh_CN 3.5.2 - ensure we show correct missing dependency info (FS#23424) - pacman usage/--help updates (FS#23433, FS#23369) - ensure stdout/stderr are flushed before prompts (FS#23492) diff --git a/doc/makepkg.conf.5.txt b/doc/makepkg.conf.5.txt index 9d3ad0a1..3ce4759f 100644 --- a/doc/makepkg.conf.5.txt +++ b/doc/makepkg.conf.5.txt @@ -70,7 +70,7 @@ Options This is often used to set the number of jobs used, for example, `-j2`. Other flags that make accepts can also be passed. -**BUILDENV=(**fakeroot !distcc color !ccache !sign**)**:: +**BUILDENV=(**fakeroot !distcc color !ccache check !sign**)**:: This array contains options that affect the build environment, the defaults are shown here. All options should always be left in the array; to enable or disable an option simply remove or place an ``!'' at the front of the diff --git a/src/pacman/util.c b/src/pacman/util.c index 3b4d0294..27b18601 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -232,8 +232,9 @@ void indentprint(const char *str, int indent) return; } - /* if we're not a tty, print without indenting */ - if(cols == 0) { + /* if we're not a tty, or our tty is not wide enough that wrapping even makes + * sense, print without indenting */ + if(cols == 0 || indent > cols) { printf("%s", str); return; } @@ -577,12 +578,16 @@ void list_display(const char *title, const alpm_list_t *list) if(!list) { printf("%s\n", _("None")); } else { - int cols; - const int maxcols = getcols(80); - for(i = list, cols = len; i; i = alpm_list_next(i)) { - char *str = alpm_list_getdata(i); + const int maxcols = getcols(0); + int cols = len; + const char *str = alpm_list_getdata(list); + printf("%s", str); + cols += string_length(str); + for(i = alpm_list_next(list), cols = len; i; i = alpm_list_next(i)) { + const char *str = alpm_list_getdata(i); int s = string_length(str); - if(cols + s + 2 >= maxcols) { + /* wrap only if we have enough usable column space */ + if(maxcols > len && cols + s + 2 >= maxcols) { int j; cols = len; printf("\n"); |