Skip to content
Snippets Groups Projects
  1. Nov 26, 2019
  2. Nov 25, 2019
  3. Nov 22, 2019
  4. Nov 15, 2019
    • Chuck's avatar
      Check for and repair bad .links entries · 3e2c77d0
      Chuck authored
      A corrupt entry in .links prevents adding a fixed version of that file
      to the store in any path.  The user experience is that corruption
      present in the store 'spreads' to new paths added to the store:
      
      (With store optimisation enabled)
      
      1. A file in the store gets corrupted somehow (eg: filesystem bug).
      2. The user tries to add a thing to the store which contains a good copy
         of the corrupted file.
      3. The file being added to the store is hashed, found to match the bad
         .links entry, and is replaced by a link to the bad .links entry.
         (The .links entry's hash is not verified during add -- this would
         impose a substantial performance burden.)
      4. The user observes that the thing in the store that is supposed to be
         a copy of what they were trying to add is not a correct copy -- some
         files have different contents!  Running "nix-store --verify
         --check-contents --repair" does not fix the problem.
      
      This change makes "nix-store --verify --check-contents --repair" fix
      this problem.  Bad .links entries are simply removed, allowing future
      attempts to insert a good copy of the file to succeed.
      3e2c77d0
  5. Nov 14, 2019
Loading