[csw-maintainers] /usr/{local,share} references

Philip Brown phil at bolthole.com
Tue Feb 8 21:40:21 CET 2011


2011/2/8 Maciej Bliziński <maciej at opencsw.org>:
> I've spent some time researching the scale of /usr/{local,share}
> references.  I've re-indexed our catalog and compiled a list of all
> files that currently trigger this error:
>
> http://buildfarm.opencsw.org/~maciej/files-with-bad-content.html
>
> The numbers are: 4010 occurrences of /usr/local and 1564 occurences of
> /usr/share.
>
> Some people probably already had worked with their packages cleaning
> up /usr/{local,shared} references.  What are your thoughts about it,
> given the number of occurrences of this issue in our catalog, is the
> benefit worth the effort?
>

I dont think its worth attempting to put together a project whose
purpose is to go through and eliminate references in all pre-existing
packages.

On the other hand, it seems a no-brainer to do so for new or updated
packages going forward.
After all, it should be fairly trivial to throw together an automated
script to do it with minimal effort

A silly little example being

for f in `find . -type f | xargs grep -l /usr/local` ; do
sed 's:/usr/local:/opt/csw:g' $f >$f.cswfix; mv $f.cswfix $f
done

Feel free to rewrite in your preferred language of perl, python, or
whatever floats your boat :)


More information about the maintainers mailing list