[pacman-dev] Several output issues
I wonder if the output of this mail won't be a problem in itself, but well I'll give it a try at least. While using pacman 3.1 , I've noticed several issues with the output. Unfortunately I wasn't able to debug any of them, but thought I would share them anyway, in case someone has a clue. I noticed mostly two kinds of issues : 1) Issues with the messages / notifications from src/pacman/callback.c
$ sudo LANG=C pacman -S xf86-video-i810 resolving dependencies... done. :: xf86-video-i810 conflicts with xf86-video-intel. Remove xf86-video-intel? [Y/n] looking for inter-conflicts... done.
Remove: xf86-video-intel
Total Removed Size: 0.10 MB Targets: xf86-video-i810-1.7.4-6
Total Package Size: 3.55 MB Total Installed Size: 9.87 MB
Proceed with installation? [Y/n]
That "looking for inter-conflicts..." message looks a bit weird there.
$ sudo LANG=C pacman -S xterm :: xterm-229-2: local version is up to date. Upgrade anyway? [Y/n] resolving dependencies... done. looking for inter-conflicts... done.
Targets: xterm-229-2
Total Package Size: 0.20 MB
Proceed with installation? [Y/n] :: Archive xterm-229-2.pkg.tar.gz is corrupted. Do you want to delete it? [Y/n] checking package integrity... error: failed to commit transaction (corrupted package) archive xterm-229-2.pkg.tar.gz was corrupted (bad MD5 checksum) Errors occurred, no packages were upgraded.
Same for "checking package integrity..." here. 2) Issues with the progress bar (used in remove_commit and commit_single_pkg)
$ sudo LANG=C pacman -R xorg-xinit xorg-twm loading package data... checking dependencies... done. warning: /etc/X11/twm/system.twmrc saved as /etc/X11/twm/system.twmrc.pacsave (1/2) removing xorg-twm [############################] 100% warning: /etc/skel/.xinitrc saved as /etc/skel/.xinitrc.pacsave------------------] 0% (2/2) removing xorg-xinit [############################] 100
$ sudo LANG=C pacman -S xorg-xinit xorg-twm :: xorg-xinit-1.0.5-1: local version is up to date. Upgrade anyway? [Y/n] :: xorg-twm-1.0.1-2: local version is up to date. Upgrade anyway? [Y/n] resolving dependencies... done. looking for inter-conflicts... done.
Targets: xorg-xinit-1.0.5-1 xorg-twm-1.0.1-2
Total Package Size: 0.10 MB
Proceed with installation? [Y/n] checking package integrity... done. (2/2) checking for file conflicts [############################] 100% (1/2) upgrading xorg-xinit [############################] 100% warning: /etc/X11/twm/system.twmrc installed as /etc/X11/twm/system.twmrc.pacnew-] 0% (2/2) upgrading xorg-twm [############################] 100
$ sudo LANG=C pacman -S filesystem :: filesystem-2007.08-2: local version is up to date. Upgrade anyway? [Y/n] resolving dependencies... done. looking for inter-conflicts... done.
Targets: filesystem-2007.08-2
Total Package Size: 0.10 MB
Proceed with installation? [Y/n] checking package integrity... done. (1/1) checking for file conflicts [############################] 100% warning: directory permissions differ on proc/ [----------------------------] 0% filesystem: 555 package: 755(1/1) upgrading filesystem [############################] 100%
That last one is a bit particular, I think it was missed during that last newline commit : http://projects.archlinux.org/git/?p=pacman.git;a=commit;h=5c9eec5570c145c07... But after adding newlines, it just behaves like the above ones, the messages end with a progressbar, and it looks rather odd. I think I see at least 2 workarounds for this problem : * totally disable all these warnings during extraction * buffer the messages, and display them only after all the files have been extracted. There might be a better solution that doesn't require any of these though. Wouldn't it be possible to just clear the line before outputting the messages, or something like that, and let the progress bar redisplay itself on the next line?
On 9/13/07, Xavier <shiningxc@gmail.com> wrote:
I think I see at least 2 workarounds for this problem : * totally disable all these warnings during extraction * buffer the messages, and display them only after all the files have been extracted.
There might be a better solution that doesn't require any of these though. Wouldn't it be possible to just clear the line before outputting the messages, or something like that, and let the progress bar redisplay itself on the next line?
I remember this! *ahem* I know I haven't been keeping up with all this stuff, but I promise you - I'm going to, damnit. Anyway, I remember this "issue" and what I had done was when a progress-bar line had actual output during it's display (that is, when the progress was interrupted by text), the line was padded with spaces and a newline, to make it look pretty. I'm going to guess current output changes did away with this jazz. But also introduced oddities like these fun missing newlines. I have some time this weekend to peek at this stuff. I'm sure I'll spend more time looking over what's changed since I last updated, but if this isn't fixed by then, I'll get to it.
On Thu, Sep 13, 2007 at 05:49:49PM -0500, Aaron Griffin wrote:
I remember this! *ahem* I know I haven't been keeping up with all this stuff, but I promise you - I'm going to, damnit.
Anyway, I remember this "issue" and what I had done was when a progress-bar line had actual output during it's display (that is, when the progress was interrupted by text), the line was padded with spaces and a newline, to make it look pretty.
I'm going to guess current output changes did away with this jazz. But also introduced oddities like these fun missing newlines.
I have some time this weekend to peek at this stuff. I'm sure I'll spend more time looking over what's changed since I last updated, but if this isn't fixed by then, I'll get to it.
Just did some testing with pacman 3.0 : using english output, it worked fine, but in french, there already was a little problem : (1/1) Analyse des conflits entre fichiers [############################################] 100% Avertissement: /etc/X11/twm/system.twmrc installé en tant que /etc/X11/twm/system.twmrc.pacnew % (1/1) Mise à jour xorg-twm [############################################] 100% Just the % appeared at the end of the line. That's still better than the current pacman 3.1 output, as seen in my first post. I wasn't even able to find out where this padding was done in 3.0.. I suck :p
On 9/14/07, Xavier <shiningxc@gmail.com> wrote:
On Thu, Sep 13, 2007 at 05:49:49PM -0500, Aaron Griffin wrote:
I remember this! *ahem* I know I haven't been keeping up with all this stuff, but I promise you - I'm going to, damnit.
Anyway, I remember this "issue" and what I had done was when a progress-bar line had actual output during it's display (that is, when the progress was interrupted by text), the line was padded with spaces and a newline, to make it look pretty.
I'm going to guess current output changes did away with this jazz. But also introduced oddities like these fun missing newlines.
I have some time this weekend to peek at this stuff. I'm sure I'll spend more time looking over what's changed since I last updated, but if this isn't fixed by then, I'll get to it.
Just did some testing with pacman 3.0 : using english output, it worked fine, but in french, there already was a little problem : (1/1) Analyse des conflits entre fichiers [############################################] 100% Avertissement: /etc/X11/twm/system.twmrc installé en tant que /etc/X11/twm/system.twmrc.pacnew % (1/1) Mise à jour xorg-twm [############################################] 100%
Just the % appeared at the end of the line. That's still better than the current pacman 3.1 output, as seen in my first post.
Random guess without looking at it, this is another "fail at calculating the line length due to accented chars".
On Fri, Sep 14, 2007 at 11:15:19AM -0500, Aaron Griffin wrote:
On 9/14/07, Xavier <shiningxc@gmail.com> wrote:
Just did some testing with pacman 3.0 : using english output, it worked fine, but in french, there already was a little problem : (1/1) Analyse des conflits entre fichiers [############################################] 100% Avertissement: /etc/X11/twm/system.twmrc installé en tant que /etc/X11/twm/system.twmrc.pacnew % (1/1) Mise à jour xorg-twm [############################################] 100%
Just the % appeared at the end of the line. That's still better than the current pacman 3.1 output, as seen in my first post.
Random guess without looking at it, this is another "fail at calculating the line length due to accented chars".
Yes, that was the problem indeed. Since I didn't know anything about this stuff, I asked for some help on ##c :) So it's possible to compute the real number of characters using mblen in a loop. I did that on pacman 3.0 and it works fine, the above problem is fixed. About pacman 3.1 , I see Dan removed that pm_printf function, and later added back a much simpler version of it, without all that padding stuff. So maybe the old version should be restored? --- pacman-3.0.5/src/pacman/log.c 2007-03-13 17:15:38.000000000 +0100 +++ pacman-3.0.5-new/src/pacman/log.c 2007-09-14 20:15:32.000000000 +0200 @@ -135,7 +135,14 @@ if(needpad == 1) { int i, cols = getcols(); - for(i=len; i < cols; ++i) { + /* compute the number of multibyte characters */ + int nchar = 0; + char *p = str; + while(*p) { + nchar += mblen(p, 2); + p++; + } + for(i=nchar; i < cols; ++i) { fprintf(file, " "); } if(neednl == 1 && line == NL) {
On 9/14/07, Xavier <shiningxc@gmail.com> wrote:
On Fri, Sep 14, 2007 at 11:15:19AM -0500, Aaron Griffin wrote:
On 9/14/07, Xavier <shiningxc@gmail.com> wrote:
Just did some testing with pacman 3.0 : using english output, it worked fine, but in french, there already was a little problem : (1/1) Analyse des conflits entre fichiers [############################################] 100% Avertissement: /etc/X11/twm/system.twmrc installé en tant que /etc/X11/twm/system.twmrc.pacnew % (1/1) Mise à jour xorg-twm [############################################] 100%
Just the % appeared at the end of the line. That's still better than the current pacman 3.1 output, as seen in my first post.
Random guess without looking at it, this is another "fail at calculating the line length due to accented chars".
Yes, that was the problem indeed. Since I didn't know anything about this stuff, I asked for some help on ##c :) So it's possible to compute the real number of characters using mblen in a loop. I did that on pacman 3.0 and it works fine, the above problem is fixed.
About pacman 3.1 , I see Dan removed that pm_printf function, and later added back a much simpler version of it, without all that padding stuff. So maybe the old version should be restored?
Prodding here. Is this still an issue with the git version? It seems the output functions are much improved
On Thu, Sep 27, 2007 at 11:09:30PM -0500, Aaron Griffin wrote:
On 9/14/07, Xavier <shiningxc@gmail.com> wrote:
On Fri, Sep 14, 2007 at 11:15:19AM -0500, Aaron Griffin wrote:
On 9/14/07, Xavier <shiningxc@gmail.com> wrote:
Just did some testing with pacman 3.0 : using english output, it worked fine, but in french, there already was a little problem : (1/1) Analyse des conflits entre fichiers [############################################] 100% Avertissement: /etc/X11/twm/system.twmrc installé en tant que /etc/X11/twm/system.twmrc.pacnew % (1/1) Mise à jour xorg-twm [############################################] 100%
Just the % appeared at the end of the line. That's still better than the current pacman 3.1 output, as seen in my first post.
Random guess without looking at it, this is another "fail at calculating the line length due to accented chars".
Yes, that was the problem indeed. Since I didn't know anything about this stuff, I asked for some help on ##c :) So it's possible to compute the real number of characters using mblen in a loop. I did that on pacman 3.0 and it works fine, the above problem is fixed.
About pacman 3.1 , I see Dan removed that pm_printf function, and later added back a much simpler version of it, without all that padding stuff. So maybe the old version should be restored?
Prodding here. Is this still an issue with the git version? It seems the output functions are much improved
The issue is mainly with 3.1. The first post in this thread was made with 3.1. You then pointed me to some padding stuff, which I found only in 3.0. Indeed, 3.0 behaves better, except that there was a minor issue with widecharacters, eg. french accent é. I proposed a fix for that, but it only applies to 3.0 . 3.1 removed all that padding, so now the whole bar is displayed after output messages (again, see the first post in this thread).
On 9/28/07, Xavier <shiningxc@gmail.com> wrote:
On Thu, Sep 27, 2007 at 11:09:30PM -0500, Aaron Griffin wrote:
On 9/14/07, Xavier <shiningxc@gmail.com> wrote:
On Fri, Sep 14, 2007 at 11:15:19AM -0500, Aaron Griffin wrote:
On 9/14/07, Xavier <shiningxc@gmail.com> wrote:
Just did some testing with pacman 3.0 : using english output, it worked fine, but in french, there already was a little problem : (1/1) Analyse des conflits entre fichiers [############################################] 100% Avertissement: /etc/X11/twm/system.twmrc installé en tant que /etc/X11/twm/system.twmrc.pacnew % (1/1) Mise à jour xorg-twm [############################################] 100%
Just the % appeared at the end of the line. That's still better than the current pacman 3.1 output, as seen in my first post.
Random guess without looking at it, this is another "fail at calculating the line length due to accented chars".
Yes, that was the problem indeed. Since I didn't know anything about this stuff, I asked for some help on ##c :) So it's possible to compute the real number of characters using mblen in a loop. I did that on pacman 3.0 and it works fine, the above problem is fixed.
About pacman 3.1 , I see Dan removed that pm_printf function, and later added back a much simpler version of it, without all that padding stuff. So maybe the old version should be restored?
Prodding here. Is this still an issue with the git version? It seems the output functions are much improved
The issue is mainly with 3.1. The first post in this thread was made with 3.1. You then pointed me to some padding stuff, which I found only in 3.0. Indeed, 3.0 behaves better, except that there was a minor issue with widecharacters, eg. french accent é. I proposed a fix for that, but it only applies to 3.0 . 3.1 removed all that padding, so now the whole bar is displayed after output messages (again, see the first post in this thread).
Yeah I misunderstood just a little. Most likely, we're going to have to add the padding back in - because you're familiar with this problem, can you give me a test case for this? LANG=fr_FR pacman -S foo ?
On Fri, Sep 28, 2007 at 10:21:48AM -0500, Aaron Griffin wrote:
Yeah I misunderstood just a little. Most likely, we're going to have to add the padding back in - because you're familiar with this problem, can you give me a test case for this? LANG=fr_FR pacman -S foo ?
Hm no, I don't have an easy test case for this, since I had to trigger a pacnew extraction : 1) Fake the md5sum of a config file in the database. For example, open /var/lib/pacman/local/xorg-twm-1.0.1-2/files , and replace one char in the md5sum of twmrc 2) edit that config file. echo bla >> /etc/X11/twm/system.twmrc 3) enable french locale, eg fr_FR.utf8 4) reinstall the package LANG=fr_FR.utf8 pacman -S xorg-twm
participants (2)
-
Aaron Griffin
-
Xavier