Merge branch 'maint'

Conflicts:
	doc/makepkg.conf.5.txt
This commit is contained in:
Dan McGee 2011-06-14 08:29:39 -05:00
commit fbb44a6e0d
3 changed files with 15 additions and 9 deletions

3
NEWS
View file

@ -5,8 +5,9 @@ VERSION DESCRIPTION
- --print should not enable --noconfirm (FS#24287) - --print should not enable --noconfirm (FS#24287)
- fix default path substitution in documentation - fix default path substitution in documentation
- makepkg: quote variables that may contain spaces (FS#24002) - 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) - 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) 3.5.2 - ensure we show correct missing dependency info (FS#23424)
- pacman usage/--help updates (FS#23433, FS#23369) - pacman usage/--help updates (FS#23433, FS#23369)
- ensure stdout/stderr are flushed before prompts (FS#23492) - ensure stdout/stderr are flushed before prompts (FS#23492)

View file

@ -70,7 +70,7 @@ Options
This is often used to set the number of jobs used, for example, `-j2`. This is often used to set the number of jobs used, for example, `-j2`.
Other flags that make accepts can also be passed. 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 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 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 or disable an option simply remove or place an ``!'' at the front of the

View file

@ -232,8 +232,9 @@ void indentprint(const char *str, int indent)
return; return;
} }
/* if we're not a tty, print without indenting */ /* if we're not a tty, or our tty is not wide enough that wrapping even makes
if(cols == 0) { * sense, print without indenting */
if(cols == 0 || indent > cols) {
printf("%s", str); printf("%s", str);
return; return;
} }
@ -577,12 +578,16 @@ void list_display(const char *title, const alpm_list_t *list)
if(!list) { if(!list) {
printf("%s\n", _("None")); printf("%s\n", _("None"));
} else { } else {
int cols; const int maxcols = getcols(0);
const int maxcols = getcols(80); int cols = len;
for(i = list, cols = len; i; i = alpm_list_next(i)) { const char *str = alpm_list_getdata(list);
char *str = alpm_list_getdata(i); 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); 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; int j;
cols = len; cols = len;
printf("\n"); printf("\n");