Changeset 12003


Ignorieren:
Zeitstempel:
10.05.2014 14:02:22 (vor 4 Jahren)
Autor:
er13
Nachricht:

fwmod:

  • define an order on all same-named patches, do not apply patch X if a version of it with a higher order exists (s. comment in the source code for more details)
Datei:
1 bearbeitet

Legende:

Unverändert
Hinzugefügt
Entfernt
  • trunk/fwmod

    r12002 r12003  
    758758    # Apply firmware-series-specific and box-specific patches (both common for all languages and language-specific) 
    759759    shopt -s nullglob 
    760     for j in ${PATCHES_DEVICES_DIR_FULL_LIST[@]}; do 
    761         for i in $j/*.patch; do 
     760    for ((j=0; j<${#PATCHES_DEVICES_DIR_FULL_LIST[@]}; j++)); do 
     761        for i in ${PATCHES_DEVICES_DIR_FULL_LIST[$j]}/*.patch; do 
     762            # Check if a more specific version of the patch exists, 
     763            # i.e. define an order on all patches with the same name 
     764            #   FW_SERIES/XY.patch 
     765            #   FW_SERIES/LANG/XY.patch 
     766            #   FW_SERIES/BOXID/XY.patch 
     767            #   FW_SERIES/BOXID/LANG/XY.patch 
     768            # and do NOT apply patch XY.patch from dir FOO 
     769            # if it also exists in a directory with a higher order. 
     770            # 
     771            # This makes it possible in situations where one box needs 
     772            # a box-specific version of the patch to have just two versions 
     773            # of it: one box-specific and one for all other boxes. 
     774            i_basename=$(basename "$i") 
     775            for ((jj=j+1; jj<${#PATCHES_DEVICES_DIR_FULL_LIST[@]}; jj++)); do 
     776                if [ -f "${PATCHES_DEVICES_DIR_FULL_LIST[$jj]}/${i_basename}" ]; then 
     777                    #echo1 "more specific version of $i found: ${PATCHES_DEVICES_DIR_FULL_LIST[$jj]}/${i_basename}, skipping $i" 
     778                    break 2 
     779                fi 
     780            done 
     781 
    762782            modpatch "$FILESYSTEM_MOD_DIR" "$i" 
    763783        done 
Hinweis: Hilfe zur Verwendung der Changeset-Ansicht finden Sie unter TracChangeset.