Bug#575087: Bug #575087 and #599083: wbar default configuration has a broken path to a font file

2012-10-12 Thread gregor herrmann
On Sat, 29 Sep 2012 15:53:05 +0200, Markus Koschany wrote:

 1. I still think the bug isn't release critical.

I tend to agree here, and Julien has also argued the same in #599083.
I admit it's annoying that wbar doesn't work out of the box (if
Recommends are not installed) but it's not the only software that
needs configuration changes before using it, and not installing
Recommends also comes with a price ...

And at least if started from a terminal the failure isn't silent
either (IIRC).

 2. My packaged version of wbar, 2.3.4, fixes all outstanding
bugs including this one.

I haven't looked at 2.3.4, but in general new upstream releases are
not the way to go during a freeze.

 3. I have prepared another fix for the
broken-path-to-a-font-file-problem and attached it.

Yeah, might make sense if this bug is considered RC (although it also
doesn't make it work, just the diagnostics seem to be nicer).
In case this patch is needed, it should be trimmed down (most of the
changes are removed trailing whitespaces).
 

Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT  SPI, fellow of the Free Software Foundation Europe
   `-   NP: Cat Stevens: Where Do The Children Play?


signature.asc
Description: Digital signature


Bug#575087: Bug #575087 and #599083: wbar default configuration has a broken path to a font file

2012-10-12 Thread Markus Koschany
On Fri, 12. Oct 15:27 gregor herrmann gre...@debian.org wrote:
 On Sat, 29 Sep 2012 15:53:05 +0200, Markus Koschany wrote:
 
  1. I still think the bug isn't release critical.
 
 I tend to agree here, and Julien has also argued the same in #599083.

Hi gregor,

thanks for stopping by.

  2. My packaged version of wbar, 2.3.4, fixes all outstanding
 bugs including this one.
 
 I haven't looked at 2.3.4, but in general new upstream releases are
 not the way to go during a freeze.

Agreed. This should be a last resort. I just don't think that this is a
bug where changing two lines of code can solve everything. It is more of
a usability issue. IMO a grave bug is something which makes a package
unusable and i can prove that's not the case here.   
 
  3. I have prepared another fix for the
 broken-path-to-a-font-file-problem and attached it.
 
 Yeah, might make sense if this bug is considered RC (although it also
 doesn't make it work, just the diagnostics seem to be nicer).
 In case this patch is needed, it should be trimmed down (most of the
 changes are removed trailing whitespaces).

Thanks, i will take care of it, if the patch should really be necessary.
I'm in favor of downgrading this bug to important again but i would like
to hear Barts opinion first.

Regards,
Markus



signature.asc
Description: Digital signature


Bug#575087: Bug #575087 and #599083: wbar default configuration has a broken path to a font file

2012-10-12 Thread gregor herrmann
On Fri, 12 Oct 2012 23:08:49 +0200, Markus Koschany wrote:

 thanks for stopping by.

:)
It showed up on my RC bug radar ...
 
   2. My packaged version of wbar, 2.3.4, fixes all outstanding
  bugs including this one.
  I haven't looked at 2.3.4, but in general new upstream releases are
  not the way to go during a freeze.
 Agreed. This should be a last resort. I just don't think that this is a
 bug where changing two lines of code can solve everything. It is more of
 a usability issue. IMO a grave bug is something which makes a package
 unusable and i can prove that's not the case here.   

Ack on all points from my side.
  
   3. I have prepared another fix for the
  broken-path-to-a-font-file-problem and attached it.
  Yeah, might make sense if this bug is considered RC (although it also
  doesn't make it work, just the diagnostics seem to be nicer).
  In case this patch is needed, it should be trimmed down (most of the
  changes are removed trailing whitespaces).
 Thanks, i will take care of it, if the patch should really be necessary.
 I'm in favor of downgrading this bug to important again but i would like
 to hear Barts opinion first.

Right, I'm also looking forward to hear Bart's point of view.


Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT  SPI, fellow of the Free Software Foundation Europe
   `-   NP: Rod Stewart: I'm In The Mood For Love


signature.asc
Description: Digital signature


Bug#575087: Bug #575087 and #599083: wbar default configuration has a broken path to a font file

2012-09-29 Thread Markus Koschany
Hi all

I case you are wondering why this bug is marked as release critical,
here a some more information and solutions.

First of all i intend to adopt wbar [1] and i have already filed a
request for sponsorship. [2]

Bart set the severity of #575087 to grave and asked me to consider to
prepare a fix for Wheezy. [3]

My response [4] hasn't changed fundamentally yet because no additional
information were added to the bug report.

1. I still think the bug isn't release critical.
2. My packaged version of wbar, 2.3.4, fixes all outstanding
   bugs including this one.
3. I have prepared another fix for the
   broken-path-to-a-font-file-problem and attached it.

I can't reproduce that wbar 1.3.3 fails silently on a default
installation.

$ aptitude install wbar
$ cp /usr/share/wbar/dot.wbar ~/.wbar
$ wbar -pos top -isize 48

This installs wbar, gnome-extra-icons and fonts-dustin and starts wbar
at the top of the screen. After that you can change the icons and the
font by editing the config file.

Both bug reporters had most likely installed wbar without recommended
packages. Only in this case wbar will refuse to start and throw an
exception. You must obviously set a correct path in your .wbar config file.

I agree this is not the most user friendly behaviour but this issue
doesn't exist anymore in 2.3.4 and wbar deals more gracefully with it.

Therefore i suggest to upload 2.3.4 to Wheezy. It fixes a lot of minor
bugs which aren't even mentioned here and is in general more user friedly.

A partial solution to the problem is to avoid throwing an exception
in case a wrong font path was set. My attached patch is small and
would fix this issue.

If you insist this bug is RC then please consider uploading version
2.3.4 to Unstable and unblocking it for Wheezy or if at all please use
the attached patch.

Regards
Markus


[1] http://bugs.debian.org/678865
[2] http://bugs.debian.org/688310
[3] http://bugs.debian.org/688310#14
[4] http://bugs.debian.org/688310#19
diff -u wbar-1.3.3+dfsg2/debian/changelog wbar-1.3.3+dfsg2/debian/changelog
--- wbar-1.3.3+dfsg2/debian/changelog
+++ wbar-1.3.3+dfsg2/debian/changelog
@@ -1,3 +1,11 @@
+wbar (1.3.3+dfsg2-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Wbar won't refuse to start anymore if a font path isn't set correctly.
+This is a partial solution to fix #575087. 
+
+ -- Markus Koschany a...@gambaru.de  Sat, 29 Sep 2012 13:54:47 +0200
+
 wbar (1.3.3+dfsg2-1) unstable; urgency=low
 
   * Repacked again to get rid of non-free icons (Closes: #540612)
only in patch2:
unchanged:
--- wbar-1.3.3+dfsg2.orig/SuperBar.cc
+++ wbar-1.3.3+dfsg2/SuperBar.cc
@@ -1,17 +1,19 @@
 #include SuperBar.h
 #include SuperIcon.h
+#include stdlib.h
+#include iostream
 
 using namespace std;
 
 /* Super Constructor *//*{{{*/
-SuperBar::SuperBar(XWin *win, string barImg, string barFont, int iSize, int 
iDist, 
-float zFactor, float jFactor, int bOrient, int bPosition, int nAnim, int 
barAlfa, 
+SuperBar::SuperBar(XWin *win, string barImg, string barFont, int iSize, int 
iDist,
+float zFactor, float jFactor, int bOrient, int bPosition, int nAnim, int 
barAlfa,
 int unfocusAlfa, int filtSel, unsigned int filtCol, bool dfont) :
 
-Bar(win, barImg, iSize, iDist, zFactor, jFactor, bOrient, bPosition, 
nAnim), 
-font(NULL), drawfont(dfont), rest_w(0), filtSel(filtSel), filtRed((filtCol 
 0x00ff)16), 
+Bar(win, barImg, iSize, iDist, zFactor, jFactor, bOrient, bPosition, 
nAnim),
+font(NULL), drawfont(dfont), rest_w(0), filtSel(filtSel), filtRed((filtCol 
 0x00ff)16),
 filtGreen((filtCol  0xff00)8), filtBlue(filtCol  0x00ff),
-filtAlfa((filtCol  0xff00)24), unfocusAlfa(unfocusAlfa), 
barAlfa(barAlfa) { 
+filtAlfa((filtCol  0xff00)24), unfocusAlfa(unfocusAlfa), 
barAlfa(barAlfa) {
 
 int textW, textH;
 
@@ -21,8 +23,11 @@
 if( !barFont.empty() ){
ADD_FONT_PATH(getenv(HOME));
if( !(font = LOAD_FONT(barFont.c_str())) )
-   throw (barFont +  - Couldn't load font.).c_str();
-   USE_FONT(font);
+   {
+   std::cout  (Problem loading font file.) barFont  
std::endl;
+   return;
+}
+USE_FONT(font);
 
imlib_get_text_size(MM, textW, textH);
font_restore = CREATE_IMAGE(textW, 2*textH);
@@ -94,7 +99,7 @@
imlib_filter_set_blue (0, 0, 0, 0, 0, 0);
 
imlib_filter_set_alpha(0, 0, filtAlfa, 0, 0, 0); // new
-   imlib_filter_divisors(255, filtRed!=0?3*255/filtRed:1, 
+   imlib_filter_divisors(255, filtRed!=0?3*255/filtRed:1,
filtGreen!=0?3*255/filtGreen:1, filtBlue!=0?3*255/filtBlue:1);
 #endif
 
@@ -103,7 +108,7 @@
 /* Set alfa to the Bar */
 if(barAlfa != -1){
fAlfaBar = imlib_create_filter(0);
-   imlib_context_set_filter(fAlfaBar); 
+   imlib_context_set_filter(fAlfaBar);
imlib_filter_set_alpha(0, 0, barAlfa, 0, 0, 0);