Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> --- contrib/paclog-pkglist.sh.in | 24 +++++++++++++++++------- contrib/updpkgsums.sh.in | 0 2 files changed, 17 insertions(+), 7 deletions(-) mode change 100755 => 100644 contrib/updpkgsums.sh.in diff --git a/contrib/paclog-pkglist.sh.in b/contrib/paclog-pkglist.sh.in index 222bbc4..908bd4a 100644 --- a/contrib/paclog-pkglist.sh.in +++ b/contrib/paclog-pkglist.sh.in @@ -50,25 +50,35 @@ fi <"$logfile" awk ' { - action = $3 - pkgname = $4 - pkgver = $5 - upgver = $7 + if ($3 ~ /^\[.*\]$/) { + # new style with caller name + action = $4 + pkgname = $5 + pkgver = $6 + upgver = $8 + nfields = NF + } else { + action = $3 + pkgname = $4 + pkgver = $5 + upgver = $7 + nfields = (NF + 1) # compensate for missing caller field + } } -NF == 5 && action == "installed" { +nfields == 6 && action == "installed" { gsub(/[()]/, "", pkgver) pkg[pkgname] = pkgver next } -NF == 7 && action == "upgraded" { +nfields == 8 && action == "upgraded" { sub(/\)/, "", upgver) pkg[pkgname] = upgver next } -NF == 5 && action == "removed" { +nfields == 6 && action == "removed" { pkg[pkgname] = -1 } diff --git a/contrib/updpkgsums.sh.in b/contrib/updpkgsums.sh.in old mode 100755 new mode 100644 -- 1.8.1.1