Quantcast
Channel: Pinguy OS Forum - All Forums
Viewing all articles
Browse latest Browse all 1646

Bug in PinguyBuilder 4.3.8_all-beta and the fix

$
0
0
First of all I apologize for posting this here. I guess there must be a bug tracker somewhere, but I have not found it and it's very late. If I don't post this somewhere I'm probably not going to post it at all, so bear with me.

Also, I would like to thank the people who are currently working on PinguyBuilder. I was missing Remastersys dearly, and thank god you forked it!

I'm using pinguybuilder_4.3-8_all-beta.deb

Today I have tested PinguyBuilder on Ubuntu 16.04 for the first time, and it failed at the end of the procedure.

Fortunately, the terminal window outputs a useful message, and I have been able to trace the problem and find a workaround.

What happens is this:

At line 727 in /usr/bin/PinguyBuilder we have:
Code:
unsquashfs -lls $WORKDIR/ISOTMP/casper/filesystem.squashfs | grep -v " inodes " | grep -v "unsquashfs:" | awk '{print $3}' | grep -v "," > /tmp/size.tmp

If you manually run the following part:
Code:
unsquashfs -lls $WORKDIR/ISOTMP/casper/filesystem.squashfs | grep -v " inodes "
you will notice that at the end of the listing, grep adds a comment. In French it is:
Code:
Fichier binaire (entrée standard) correspondant
Which means "Binary file (standard input) matches". Grep is saying that it has found something that matches the regexp.

This last line will survive the next filters in line 727, and so on my computer the bottom of the /tmp/size.tmp file is:
Code:
...
751
1430
803
(entrée

At line 729, PinguyBuilder attempts to compute an arithmetic sum of all the lines in size.tmp, which results in a syntax error, caused by the "é" character.

This error will show up ONLY in some locale. It shows up in French because the 3rd word after the 3rd filter in line 727 contains a non-ASCII character. It would have gone unnoticed if the word "entrée" had been in the first or fourth word of the sentence.

A way to fix this bug is to change line 727 to:
Code:
unsquashfs -lls $WORKDIR/ISOTMP/casper/filesystem.squashfs | grep -v " inodes " | grep -v "unsquashfs:" | awk '{print $3}' | grep -v "," | grep [[:digit:]] > /tmp/size.tmp

because this will reject all the lines that don't have numbers in them.

Thank you for your attention on this matter, and keep up the good work!

Viewing all articles
Browse latest Browse all 1646

Trending Articles