summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2012-04-21 21:54:48 +0200
committerJustin Davis <jrcd83@gmail.com>2012-04-21 21:54:48 +0200
commit84438c212f1c9c161db2c75c2313bd0a7a3ffe2f (patch)
treef4b61fc229f5acf6c47e43c4377c97759223e32b /bin
parent1c6c8fbacbb85a253a0c4a61aa663ff6a24e9c66 (diff)
downloadgenpkg-84438c212f1c9c161db2c75c2313bd0a7a3ffe2f.tar.gz
genpkg-84438c212f1c9c161db2c75c2313bd0a7a3ffe2f.tar.xz
Emit unknown PKGDATA fields unchanged.
Previously unknown fields would be filtered out.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/modpkg12
1 files changed, 10 insertions, 2 deletions
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(