Skip to content
  • Milan Crha's avatar
    6cbe76bb
    fedora-pkgdb-collections: Race on fedora.json download · 6cbe76bb
    Milan Crha authored
    When the file in the cache directory does not exist yet, it is downloaded, but
    just when the download starts, the file monitor notices a change on the file (even
    it has 0 bytes in size), which causes the plugin itself emitting "updates-changed",
    which is caught by the Updates page and it initiated a refresh, when the current
    download was ongoing, which made another change on the file, which could result
    into a runtime warning like this one:
    
       updates-shell: failed to get upgrades: Failed to open file “~/.cache/gnome-software/fedora-pkgdb-collections/fedora.json”: open() failed: No such file or directory
    
    To avoid the race, remember there is an ongoing refresh task and share the result
    with any new, which are initiated while the current one is running.
    6cbe76bb
    fedora-pkgdb-collections: Race on fedora.json download
    Milan Crha authored
    When the file in the cache directory does not exist yet, it is downloaded, but
    just when the download starts, the file monitor notices a change on the file (even
    it has 0 bytes in size), which causes the plugin itself emitting "updates-changed",
    which is caught by the Updates page and it initiated a refresh, when the current
    download was ongoing, which made another change on the file, which could result
    into a runtime warning like this one:
    
       updates-shell: failed to get upgrades: Failed to open file “~/.cache/gnome-software/fedora-pkgdb-collections/fedora.json”: open() failed: No such file or directory
    
    To avoid the race, remember there is an ongoing refresh task and share the result
    with any new, which are initiated while the current one is running.
Loading