From b0590400111c04e1c6a42052d3f03986b4ad31aa Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 7 Jun 2011 15:05:37 -0500 Subject: [PATCH 1/3] Add late-breaking 3.5.3 NEWS Signed-off-by: Dan McGee --- NEWS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 861f506a..b525b104 100644 --- a/NEWS +++ b/NEWS @@ -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) From 895a88886525dd3e6d2d0db996cedb7e73455fbb Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 13 Jun 2011 17:04:35 -0500 Subject: [PATCH 2/3] Fix list_display on non-ttys and other output fixes commit c1f742d7750a14 broke what was one of the tenants of out output- if piping pacman output somewhere else, we shouldn't ever try to line-wrap and indent print our output. This makes it easier for tools to use output from pacman -Ss, -Qs, -Qi, etc. list_display() unfortunately was given a default value of 80 rather than 0, so fix this. Next, make some additional changes that ensure we don't insert an unnecessary blank line if for some crazy reason the indent level (such as on -Qi output) is greater than the number of columns. Accomplish this by printing the first item unconditionally as we do in list_display_linebreak(). Finally, teach indentprint to not wrap if the number of columns is less than the indent level, this prevents some forms of ridiculous output such as the following: Install Date : Wed 08 Jun 2011 04:39:19 AM CDT Signed-off-by: Dan McGee --- src/pacman/util.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/pacman/util.c b/src/pacman/util.c index 508cc89f..a6d150fc 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -216,8 +216,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; } @@ -450,12 +451,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"); From 07e97a5f2c1e1039f35a7893d2be6abf07af690a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20B=C3=A9langer?= Date: Mon, 13 Jun 2011 21:44:32 -0400 Subject: [PATCH 3/3] Added check option to BUILDENV array in makepkg.conf man page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Eric BĂ©langer Signed-off-by: Dan McGee --- doc/makepkg.conf.5.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/makepkg.conf.5.txt b/doc/makepkg.conf.5.txt index 61302492..30ddf0a6 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**)**:: +**BUILDENV=(**fakeroot !distcc color !ccache check**)**:: 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