From 84438c212f1c9c161db2c75c2313bd0a7a3ffe2f Mon Sep 17 00:00:00 2001 From: Justin Davis Date: Sat, 21 Apr 2012 15:54:48 -0400 Subject: Emit unknown PKGDATA fields unchanged. Previously unknown fields would be filtered out. --- bin/modpkg | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/modpkg b/bin/modpkg index c3ec908..bee0069 100755 --- a/bin/modpkg +++ b/bin/modpkg @@ -203,10 +203,13 @@ ModifierContext := Object clone do( "url", "license", "install", "changelog", "source", "noextract", "md5sums", "sha512sums", "groups", "arch", "backup", "depends", "makedepends", "checkdepends", "optdepends", - "conflicts", "provides", "replaces", "options") + "conflicts", "provides", "replaces", "options", + "packager", "maintainer") pbFuncs := list("build", "package", "check") init := method( + self extraFields := nil + self PKGBUILD := BashFile clone PKGBUILD fileName = "PKGBUILD" PKGBUILD sourceFiles := Map clone @@ -268,6 +271,11 @@ ModifierContext := Object clone do( f ifNil(f = List clone) self setSlot(fieldName, f) ) + + extraFields = Map clone + fields keys difference(pbFields) foreach(fieldName, + extraFields atPut(fieldName, fields at(fieldName)) + ) ) getFields := method( @@ -276,7 +284,7 @@ ModifierContext := Object clone do( fv := self getSlot(fieldName) fv isEmpty ifFalse(kv = list(fieldName, fv)) kv - ) select(v, v) asMap + ) select(v, v) asMap merge(extraFields) ) finish := method( -- cgit v1.2.3-24-g4f1b