Comment 8 for bug 993414

Revision history for this message
Alec Leamas (leamas-alec) wrote :

The situation is is just slightly improved in 7.0 (the inconsistent line encodings are gone). Current code to rectify situation:

# https://bugs.launchpad.net/bugs/993414
find . -name \*.py -a -perm 644 -a -type f | \
    xargs sed -i -e '\;/usr/bin/env;d' -e '\;/usr/bin/python;d'
sed -i -e '\;/usr/bin/env;d' \
    openerp/addons/l10n_fr_hr_payroll/report/fiche_paye.py
find . \( -name \*.html -o -name \*yml -o -name \*.js -o -name \*.po \
            -o -name \*.css -o -iname readme* -o -name \*.csv \
            -o -name \*.xml -o -name \*.svg \
            -o -name account_asset_change_duration.py \
            -o -name input_complete \
            -o -name base_quality_interrogation.py \
        \) -a -type f |
    xargs chmod 644
chmod 644 $( find openerp/addons/account_asset -type f -name \*.py )
chmod 644 $( find openerp/addons/l10n_fr_hr_payroll -type f -name \*.py )
chmod 644 $( find openerp/addons//l10n_ro -type f -name \*.py )

This handles:
- .py library files (not scripts) with a #/usr/bin/env or /usr/bin/python shebang by removing the shebang. A shebang on a library
file makes no sense.
- All sorts of files with -x permission which shouldn't have that (.svg, .po, .js, .csv etc.)

This is still a mess. I understand this is a low priority bug, but would nevertheless appreciate if it was fixed. The lines above is the closest to a patch I can come, though.