Commits on Feb 15, 2021

  1. backends/debian/debpkg: Forget a package's filename when removing its…

    … temporary dir
    
    When downloading remote packages, we place them into a package specific
    temporary directory. This is so we can remove them once we think we're
    done, so that peak space usage is minimised.
    
    We decide if a package is downloaded or not by the 'local' filename
    being set. If it's set, we return this path to callers and then they can
    try to operate on it. The problem is, we were failing to clear this
    variable when removing the temporary directory in some circumstances.
    That was meaning that a stale path could be given out to callers, a path
    to a file that doesn't exist any more.
    
    Fix this by always clearing the local path when removing the temporary
    directory. That means that the next time the file is requested it will
    be re-downloaded if this is a remote path.
    Iain Lane committed Feb 15, 2021
  2. backends/debian/debpkg.d: Add more synchronization

    These operations are most thread unsafe; they are dealing with the
    underlying filesystem. Make sure they are synchronized.
    Iain Lane committed Feb 15, 2021
  3. zarchive: Log the error when we can't open an archive

    libarchive stores errno with the actual cause of the error. Print it.
    Iain Lane committed Feb 15, 2021
  4. various: Improve builddir != srcdir builds and build the snap like this

    Newer versions of snapcraft seem to have changed the cwd of the build
    step. It's more robust to do this by absolute path anyway, so do that.
    
    A couple of parts of the build system want fixing for that-
    
      - Run the tests from the root of the source tree, and
      - Find data assets relative to the cwd
    
    Another alternative would be to do something like
    `G_TEST_{BUILD,SRC}DIR` that GLib has - environment variables that can
    be defined to help tests find their assets. But this works OK for now.
    
    Also run the sedding on the .gir file in override-pull; if the build
    step is run twice then this results in messed up files otherwise.
    Iain Lane committed Feb 15, 2021