[csw-maintainers] Package creation fails with filenames with whitespace
Mike Watters
mwatters at opencsw.org
Mon Mar 9 04:56:39 CET 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Roger Håkansson wrote:
> I'm trying to build the pcb-package but have stumbled upon a problem.
> Some of the files in the package have whitespace in their filename and
> when building the package (using gar v2) the prototype file gets
> generated wrong.
>
> The file "single-ended SCSI.png" ends up like this:
>
> f none /opt/csw/share/pcb/pcblib-newlib/connector/single-ended
> SCSI.png=/home/hson/dev/mgar/pkg/pcb/trunk/work/pkgroot/opt/csw/share/pcb/pcblib-newlib/connector
> /single-ended root bin hson csw
>
> Any clues on how to get around this problem?
>
> (The pcb-package is in svn if anyone want to see the problem "live")
> _______________________________________________
> maintainers mailing list
> maintainers at lists.opencsw.org
> https://lists.opencsw.org/mailman/listinfo/maintainers
I would patch the source code to change spaces to underscore for all references.
then call a post-extract to rename the files in the source tree.
this is probably the "hard way" to do it, but it works.
if you get a list of files that contain spaces, you can loop them and c
hange the files using something similar to the following:
==> Code <==
#!/bin/bash
oIFS=$IFS
IFS=\n
for file in filenamelist ;do
f_file=$(echo $file | tr ' ' '_')
perl -i -plne 's/$file/$f_file/' $(find $srcdir -type f -print)
mv "$file" "$f_file"
done
IFS=$oIFS
==> Code <==
note this code may or may not work as is
the code is syntactically correct but will require you to fit it for your env
then extract a new clean copy of the source and create your patch.
- --
Thanks,
Mike
"Any intelligent fool can make things bigger, more complex,
and more violent. It takes a touch of genius -- and a lot of courage --
to move in the opposite direction."
* Albert Einstein 1879 - 1955
US German-born Theoretical Physicist
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAkm0k3cACgkQLrhmsXMSLxcUugCeNUhkO91zfpigIGqcR3iRKHGm
L50An0iYGQTIqbnTtqFVA/d90GDJbV73
=yZw5
-----END PGP SIGNATURE-----
More information about the maintainers
mailing list