Friday, November 24, 2006

Debian fixes

When using Ubuntu Linux, you have to learn the workings of it's big big brother (maybe even father), Debian. Ubuntu is based on Debian due to it's use of packages, and the apt-get command. In fact, packages on Ubuntu and Debian are often interchangeable. So, when I installed pydance, I noticed that I couldn't run it, and I got the error message "pygame.error: SDL_ttf render failed". So, I used the wonderful tool of google, and it turned out that someone already submitted a bug. Now, the solution is fairly complicated, and it took me a couple of tries to understand it. But as you will see, a comment said that the Debian fix was here. Now, you might see that it's just a page full of text, even kinda intimidating. That's how I felt, but I managed to decode some of it. If anyone knows how to further use it, please comment, I would love to learn. Well, here's what I know.

I'll take the first chunk of code, and put it here:
--- pydance-1.0.3.orig/docs/man/pydance.6
+++ pydance-1.0.3/docs/man/pydance.6
@@ -8,7 +8,7 @@
Display a brief summary of command line options.
.IP \-\-version,\ \-v
Display the version of pydance (and features found, e.g. Psyco).
-.IP \-\-filename\, \-f
+.IP \-\-filename,\ \-f
Load and play a single file, then quit. By default, this is in
SINGLE (4 panel) mode, on BASIC difficulty.
.IP \-\-mode,\ \-m

Now, I'll just tell you what I know. Where you see the triple minus signs and triple plus signs, I figure that that is the file. As you can see, the file is located at pydance-1.0.3/docs/man/pydance.6. Now, I have no idea where that is, but I found that if I look for pydance.6 on my computer, it has the same function.

Now, you come to the double @s. I'm not too sure about these, but here's what I think. The negative value is the line number, the number of lines after that line number which are displayed. For example, for @@ -8,7 +8,7 @@, that means that you'll be on line 8, and the next seven lines are displayed (not including the line with the - sign). Now, I think the plus means where it will be AFTER you make the changes. In this case, you just replace a line, so it won't be changed, but if you go further into the fix, you'll see.

Now, you have the text with nothing in the margin. I think this is just to give the lines around the bug so you'll know where to look. You don't have to do anything with them.

Now, here's the important part:
-.IP \-\-filename\, \-f
+.IP \-\-filename,\ \-f
The - means remove this line, and the + means add this line. As you can see, this is basically the same as replacing the line.

Now, every time after you see the --- signs, it means go to the next file. So, the lines after:
--- pydance-1.0.3.orig/
+++ pydance-1.0.3/

mean you should go to pydance-1.0.3/ Then do the commands in there. So, now I've given you what I think are the tools of Debian fixes. If anyone knows what directory these refer to, please speak up. I checked the pydance source files, it didn't match exactly. When I took apart Debian packages, didn't match either. When I looked for the files on my computer, I could find the actual bugged files, but not some the documentation, plus, everything was spread around. No pydance-1.0.3 directory. So yeah, if you can find this directory, I'll be thankful.

No comments: