Changeset 8c2b505 for common


Ignore:
Timestamp:
04/01/2022 08:18:15 AM (2 years ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
ablfs-more, trunk
Children:
30a444a
Parents:
a2917ed
Message:

Fix small bugs in func_download_pkgs

  • If MISSING_FILES.DMP is left from a preceding attempt, it may

generate a false warning a bout missing files even if they could
all be downloaded.

  • do not try to copy a modified file to SRC_ARCHIVE if it already

exists: it may belong to another user...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/libs/func_download_pkgs

    ra2917ed r8c2b505  
    44get_sources() {              # Download file, write name to MISSING_FILES.DMP if an error
    55#----------------------------#
     6
     7    # Test if the packages must be downloaded
     8  [ ! "$GETPKG" = "y" ] && return
     9
    610  local saveIFS=$IFS
    711  local IFS line URL1 URL2 FILE BOOKMD5 MD5 HAVEMD5 fromARCHIVE WGETPARAM
     
    1317  WGETPARAM+=" --tries ${RETRYDOWNLOADCNT}"
    1418  WGETPARAM+=" --timeout ${DOWNLOADTIMEOUT}"
    15 
    16     # Test if the packages must be downloaded
    17   [ ! "$GETPKG" = "y" ] && return
    1819
    1920  gs_wrt_message(){
     
    2728    # Generate URLs file
    2829  create_urls
     30
     31    # Clean up leftovers from preceding attempts
     32  >MISSING_FILES.DMP
    2933
    3034  IFS=$'\x0A'  # Modify the 'internal field separator' to break on 'LF' only
     
    111115      [   -d ${SRC_ARCHIVE}  ] &&
    112116      [   -w ${SRC_ARCHIVE}  ] &&
     117      [ ! -f ${SRC_ARCHIVE}/$FILE ] &&
    113118      [ "$fromARCHIVE" = "0" ] ; then
    114119        echo "Storing file:<$FILE> in the package archive"
Note: See TracChangeset for help on using the changeset viewer.