Commit d43136f0 authored by Natanael Copa's avatar Natanael Copa

lbu: fix lbu status for encrypted apkovls

http://redmine.alpinelinux.org/issues/480
parent 620ede7e
...@@ -140,6 +140,9 @@ unpack_apkovl() { ...@@ -140,6 +140,9 @@ unpack_apkovl() {
local count=0 local count=0
mkdir -p "$dest" mkdir -p "$dest"
mount_once "$mnt" mount_once "$mnt"
if [ -n "$ENCRYPTION" ]; then
f="$f.$ENCRYPTION"
fi
if [ ! -f "$mnt/$f" ]; then if [ ! -f "$mnt/$f" ]; then
return 1 return 1
fi fi
...@@ -147,7 +150,6 @@ unpack_apkovl() { ...@@ -147,7 +150,6 @@ unpack_apkovl() {
tar -C "$dest" -zxf "$mnt/$f" tar -C "$dest" -zxf "$mnt/$f"
return return
fi fi
f="$f.$ENCRYPTION"
check_openssl check_openssl
while [ $count -lt 3 ]; do while [ $count -lt 3 ]; do
$OPENSSL enc -d -$ENCRYPTION -in "$mnt/$f" | tar \ $OPENSSL enc -d -$ENCRYPTION -in "$mnt/$f" | tar \
...@@ -564,7 +566,10 @@ cmd_status() { ...@@ -564,7 +566,10 @@ cmd_status() {
unpack_apkovl "$tmp/a" unpack_apkovl "$tmp/a"
# generate new apkovl and extract to tmpdir/b # generate new apkovl and extract to tmpdir/b
local save_encryption="$ENCRYPTION"
ENCRYPTION=
cmd_package - | tar -C "$tmp/b" -zx cmd_package - | tar -C "$tmp/b" -zx
ENCRYPTION="$save_encryption"
# show files that exists in a but not in b as deleted # show files that exists in a but not in b as deleted
local f local f
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment