Hi Alexandru, On Sun, 17 Apr 2016 at 15:40:12 +0300, Alexandru Lazar wrote: > Hi everyone, > > I just tried to pack up a theme file using getstyle. I tested this > on wmaker 0.95.7 (the version I first found it on, on an Arch Linux > box), but it seems to happen on -next as well (I just cloned the git > repo and tried it again). > > Running: > > $ getstyle -p test > > results in this error output: > > WINGs(wcopy_file(findfile.c:457)): error: Could not create target > file > "/home/alazar/GNUstep/Library/WindowMaker/Themes/test.themed//home/alazar/GNUstep/Library/WindowMaker/Pixmaps/absinthe_tile.png": > No such file or directory > > WINGs(wcopy_file(findfile.c:457)): error: Could not create target > file > "/home/alazar/GNUstep/Library/WindowMaker/Themes/test.themed//home/alazar/GNUstep/Library/WindowMaker/Backgrounds/GreenFairy.png": > No such file or directory > > A (correct) style file seems to be created in > /home/alazar/GNUstep/Library/WindowMaker/Themes/test.themed/ , but > nothing else. > > I fired up GDB and traced this to a call to wcopy_file. The problem > seems to be in this call on line 453: > > fd_dst = open(path_dst, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); > > where path_dst is set to > > $2 = 0x60b8c0 > "/home/alazar/GNUstep/Library/WindowMaker/Themes/test.themed//home/alazar/GNUstep/Library/WindowMaker/Pixmaps/absinthe_tile.png" > > but the path > /home/alazar/GNUstep/Library/WindowMaker/Themes/test.themed//home/alazar/GNUstep/Library/WindowMaker/Pixmaps/ > does not exist (I can't examine errno in the GDB session, but I > suspect it's set to ENOENT based on the output of werror). > > I have a few questions: > > 1. Am I doing anything wrong here, or is this a legit bug?
This is a bug, definitely. > 2. If it's a legit bug, would you like a patch? Of course, please! > I'm not too familiar with the WindowMaker codebase so it might take a > while, but fixing something in util/ looks like a good way to get the > hang of it (and the fix doesn't seem to require anything too > wmaker-specific). You have a case about which you personally care, that's the recipe for motivation. And fixing it will not only help yourself but also others in the future. > 3. If there is interest in a patch, should I also look into making > getstyle a little less naive with paths? I was never curious enough > to look into a .themed, but from the looks of it, getstyle -p is > trying to copy all theme assets under <output>.themed in locations > of the form <output>.themed/<absolute-path-of-asset>. It makes sense > but the resulting pathnames are large (and the theme becomes hard to > modify post-packing) and it exposes things like the creator's > username to the Internet (unlikely to be a problem, but it makes me > a little uncomfortable nonetheless...) I think your observations make sense. If you can turn them to a patch the result will most likely be an improvement. -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.