Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2013-01-23 19:28:58 -0500
committerAllan McRae <allan@archlinux.org>2013-01-28 23:38:46 +1000
commit24a78fe7315c962dde892ca85ddb0675eae622f7 (patch)
tree9fde5558a2dfb3e494339a542a209f763cb9eb9d
parent66a9b5314123b3632cb90a4d37fd422a0f898568 (diff)
paclog-pkglist: parse entries with caller info
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--contrib/paclog-pkglist.sh.in24
1 files changed, 17 insertions, 7 deletions
diff --git a/contrib/paclog-pkglist.sh.in b/contrib/paclog-pkglist.sh.in
index 222bbc4c..908bd4ad 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
}