[pacman-dev] pacman 3 cvs output issues
shild
sxp at bk.ru
Sun Mar 18 07:51:34 EDT 2007
Hello, i'm using CVS version of pacman and have some output issues (they
are locale specific). My locale is ru_RU.UTF-8 and pacman handles
this locale incorrectly at least in two places - trans.c and util.c
output of pacman -Qi gtk2:
....
Зависит от : libtiff>=3.8.2 atk>=1.11.4
pango>=1.12.1 libxcursor
libxinerama libxrandr
Удаляет : Не указано
Требуется пакетами : mozilla-firefox xchat
ettercap ethereal
mlterm gvim fluxconf
libglade librsvg trayer
gqview
....
this is `Depends On' and `Required By' in english - they break at
multiline display because of incorrect string length calculation
(function list_display @ util.c).
output of pacman -Ss lsof:
....
убираем за собой... готово.
(1/1) проверка конфликтов файлов [###########] 100%
(1/1) обновление lsof [###########] 100%
....
This is `Cleaning up... done.', `checking for file conflicts' and
`upgrading lsod' in english.
i'm attaching a very simple (and very dirty) patch for this issue - hope it
helps :)
-------------- next part --------------
diff -aur diff/trans.c ./trans.c
--- diff/trans.c 2007-03-18 16:04:35.000000000 +0500
+++ ./trans.c 2007-03-18 16:03:40.000000000 +0500
@@ -367,8 +367,8 @@
opr, pkglen, pkgname);
break;
case PM_TRANS_PROGRESS_CONFLICTS_START:
- printf("(%2$*1$d/%3$*1$d) %5$-*4$s", digits, remain, howmany,
- textlen, opr);
+ printf("(%2$*1$d/%3$*1$d) %4$s %6$-*5$.*5$s", digits, remain, howmany,
+ opr, pkglen, " ");
break;
}
diff -aur diff/util.c ./util.c
--- diff/util.c 2007-03-18 16:04:43.000000000 +0500
+++ ./util.c 2007-03-18 15:34:18.000000000 +0500
@@ -234,8 +234,10 @@
{
alpm_list_t *i;
int cols, len;
+ wchar_t buf[80];
len = strlen(title);
+ len = (int)mbstowcs(buf, title, 80);
printf("%s ", title);
if(list) {
More information about the pacman-dev
mailing list