Date: Thu, 5 Mar 2015 16:20:53 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279660 - projects/release-pkg/release/scripts Message-ID: <201503051620.t25GKrOE033149@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Thu Mar 5 16:20:53 2015 New Revision: 279660 URL: https://svnweb.freebsd.org/changeset/base/279660 Log: Support a config tag to flag a file that should be merge on upgrade Modified: projects/release-pkg/release/scripts/mtree-to-plist.awk Modified: projects/release-pkg/release/scripts/mtree-to-plist.awk ============================================================================== --- projects/release-pkg/release/scripts/mtree-to-plist.awk Thu Mar 5 16:19:45 2015 (r279659) +++ projects/release-pkg/release/scripts/mtree-to-plist.awk Thu Mar 5 16:20:53 2015 (r279660) @@ -25,14 +25,30 @@ if (length(tags) == 0) next if (tags ~ /package=/) { - gsub(/package=/,"",tags) - gsub(/,/, "-", tags) - gsub(/runtime-/, "", tags) - pkg=tags + ext = pkgname = "" + split(tags, a, ","); + for (i in a) { + if (a[i] ~ /^package=/) { + pkgname=a[i] + gsub(/package=/, "", pkgname) + } else if (a[i] == "config") { + type="config" + } else { + ext=a[i] + } + } + if (length(ext) > 0) { + if (pkgname == "runtime") { + pkgname=ext + } else { + pkgname=pkgname"-"ext + } + } } else { - pkg=tags + print "No packages specified in line: $0" > 2 + next } - output=pkg".plist" + output=pkgname".plist" print "@"type"("uname","gname","mode","flags") " $1 > output }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503051620.t25GKrOE033149>