0setup script fails in Woof

The '0setup' script in Woof* downloads package database files and converts them to Puppy-standard-format.

Sometime ago, yes I have a date, 160411, I applied a fix to the 0setup script in woofQ. UTF-8 multi-byte characters were breaking the script for Ubuntu-based builds.

These characters only occur in the description fields of the Ubuntu database files.

Back then, I inserted this code into 0setup, around line 200:
      #[ $RETSTAT -eq 0 ] && mv -f $xDLFILE ${PKGLISTFILE}pre

#160411 filter out utf-8 chars...
if [ $RETSTAT -eq 0 ];then
iconv -c -f utf-8 -t ascii $xDLFILE > ${PKGLISTFILE}pre
rm -f $xDLFILE

Today, the script was again failing. But it wasn't obvious that it failed. The Ubuntu "updates" DB files were not getting completely converted to Puppy-format, it was stopping partway through.

I wouldn't have known, except that discovered a DEB that I knew to be in the updates db, wasn't in the build, only the original version.

It took me hours, staring at the screen and wondering what was wrong. Eventually, the penny dropped, the above code also has to be inserted further down, around line 398.
That's where the update database files are being downloaded.

Well, those line numbers are in woofQ, but I just now looked in woof-CE and the line number for insertion will be 272 ...oh, it has become very different from my script, that is the only place that I can see to insert.

Note, the failure occurs at the assignment of "MANIPULATED1".

Woof-CE page:

Note also, another way to do the conversion:
# perl -i.bk -pe 's/[^[:ascii:]]//g;' filename
where filename.bk will become the original file.

No comments posted yet