Skip to content

Commit f3dab9f

Browse files
authored
Merge pull request #15608 from dmanlfc/fix-stale-hidden
fix removing hidden boot files
2 parents e3318f9 + 7e73623 commit f3dab9f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

package/batocera/core/batocera-scripts/scripts/batocera-upgrade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ do
184184
done
185185

186186
# snapshot to help create .stale file
187-
BOOT_BEFORE=$(find /boot -mindepth 1 | sed 's|^/boot/||' | grep -vE '^(boot/batocera|boot/batocera\.update|boot/rufomaculata|boot/rufomaculata\.update|boot/overlay|boot/overlay\.old|[^/]+\.upgrade|boot\.stale)$' | sort)
187+
BOOT_BEFORE=$(find /boot -mindepth 1 | sed 's|^/boot/||' | grep -vE '^(boot/batocera|boot/batocera\.update|boot/rufomaculata|boot/rufomaculata\.update|boot/overlay|boot/overlay\.old|[^/]+\.upgrade|boot\.stale|.*ldlinux.*)$' | sort)
188188

189189
# extract file on /boot
190190
do_upgmsg "Extracting files ..."
@@ -195,7 +195,7 @@ fi
195195

196196
# build stale list: entries present before extraction but absent from the new tarball
197197
do_upgmsg "Generating stale file list ..."
198-
TARBALL_CONTENTS=$(xz -dc < "/userdata/system/upgrade/boot.tar.xz" | tar tf - | sed 's|/$||' | sort)
198+
TARBALL_CONTENTS=$(xz -dc < "/userdata/system/upgrade/boot.tar.xz" | tar tf - | sed -e 's|^\./||' -e 's|/$||' | sort -u)
199199
comm -23 \
200200
<(echo "$BOOT_BEFORE") \
201201
<(echo "$TARBALL_CONTENTS") \

0 commit comments

Comments
 (0)