View Single Post
Posts: 18 | Thanked: 20 times | Joined on Jul 2008
#82
Originally Posted by marmistrz View Post
We're discussing the solutions without asking the most important person here. Aapo, what's your idea for handling these pycentral-created modules that exist in /usr/lib/python2.7 ?
A - If we think they should't exists, python2.7-minimal.preinst should abort installation
Code:
case "$1" in
    install)
        if [ -e /usr/lib/python2.7 ] && \
          [ ! -L /usr/lib/python2.7 ]; then
            echo "/usr/lib/python2.7 should not be a regoular directory before python2.7-minimal installation. Please clean it." 
            exit 1
        fi
B - Otherwise python2.7-minimal.preinst could preserve files
Code:
    case "$1" in
    install)
        if [ -e /usr/lib/python2.7 ] && \
          [ ! -L /usr/lib/python2.7 ]; then
            # /opt/python27/lib really shouldn't exists
            if [ -e /opt/python27/lib ]; then exit 1; fi 
            mkdir -p /opt/python27
            mv -i /usr/lib/python2.7 /opt/python27/lib
         fi
I vote for A :
- A is simpler and cleaner
- B could break something else, I fear (for example removal of a package with real files in /usr/lib/python2.7)
- my problematic case happende because there were files from a package who should (kindly) remove them.
- your case @marmistrz is for me not reproducible.


I'm still trying to complete python 2.7.8 packaging, btw (issues with multiarch)