• Jérome Perrin's avatar
    shared: Fix recovery after an interrupted build · 7f9afc54
    Jérome Perrin authored
    When build process is interrupted (like when the buildout process
    terminated by SIGKILL), building with shared leave the system in a state
    that looks like installation succeeded, so next execution will assume
    the part was properly installed.
    
    The behavior was something like this:
    
        if isSharedPartSignatureOK():
          useThisAlreadyInstalledPart()
        else:
          writeSignatureInSharedPart()
          try:
            build()
          except:
            removeSharedPart()
            raise
    
    and when program is terminated during build step, the signature is
    there.
    
    The fix is to write signature later, algorithm becomes:
    
        if isSharedPartSignatureOK():
          useThisAlreadyInstalledPart()
        else:
          try:
            build()
          except:
            removeSharedPart()
            raise
          writeSignatureInSharedPart()
    7f9afc54
README.rst 39.1 KB