Skip to content
  • Morgan Adamiec's avatar
    libalpm: Give -U downloads a random .part name if needed · c0026caa
    Morgan Adamiec authored and Allan McRae's avatar Allan McRae committed
    archweb's download links all ended in /download. This cause all the temp
    files to be named download.part. With parallel downloads this results in
    multiple downloads to go to the same temp file and breaks the transaction.
    Assign random temporary filenames to downloads from URLs that are either
    missing a filename, or if the filename does not contain at least three
    hyphens (as a well formed package filename does).
    While this approach to determining when to use a temporary filename is
    not 100% foolproof, it does keep nice looking download progress bar names
    when a proper package filename is given. The only downside of not using
    temporary files when provided with a filename  with three or more hyphens
    is URLs created specifically to bypass temporary filename usage can not
    be downloaded in parallel. We probably do not want to download packages
    from such URLs anyway.
    Fixes FS#71464
    Modified-by: Allan McRae (do not use temporary files for realish URLs)
    Signed-off-by: default avatarAllan McRae <>