add QA check for .pyc/.pyo files in /usr/share
authorZac Medico <zmedico@gentoo.org>
Fri, 12 Oct 2007 05:53:05 +0000 (05:53 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 12 Oct 2007 05:53:05 +0000 (05:53 -0000)
(trunk r7990)

svn path=/main/branches/2.1.2/; revision=8060

bin/misc-functions.sh

index eecf21855e8c91d99d9d83423723702b7a62bfc4..8d0e8c60015d38c52d2d4ca4eea5693862ff84dc 100755 (executable)
@@ -317,6 +317,16 @@ install_qa_check() {
                [[ ${abort} == "yes" ]] && hasq stricter ${FEATURES} && die "poor code kills airplanes"
        fi
 
+       # Compiled python objects do not belong in /usr/share (FHS violation)
+       # and can be a pain when upgrading python
+       f=$(find "${D}"/usr/share -name '*.py[co]')
+       if [[ -n ${f} ]] ; then
+               vecho -ne '\a\n'
+               eqawarn "QA Notice: Precompiled python object files do not belong in /usr/share"
+               eqawarn "${f}"
+               vecho -ne '\a\n'
+       fi
+
        # Portage regenerates this on the installed system.
        rm -f "${D}"/usr/share/info/dir{,.gz,.bz2}