summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2018-01-27 14:23:16 +0100
committerMartin Väth <martin@mvath.de>2018-01-27 14:23:16 +0100
commit45d898ec1a50fff6b9818bc072266ebb086f0632 (patch)
tree5474f852744ef04792131b50d8e1515af44fcbac /eclass
parentapp-portage/eix: Alpha version bump. Enable available spectre mitigation (diff)
downloadmv-45d898ec1a50fff6b9818bc072266ebb086f0632.tar.gz
mv-45d898ec1a50fff6b9818bc072266ebb086f0632.tar.bz2
mv-45d898ec1a50fff6b9818bc072266ebb086f0632.zip
mv_mozextension-r1.eclass: manifest.json: search "id" only inside "gecko"
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/mv_mozextension-r1.eclass9
2 files changed, 9 insertions, 5 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index e7f513ac..bf4c76a6 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,5 +1,5 @@
# ChangeLog for eclass directory
-# Copyright 2017 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 2018 Gentoo Foundation; Distributed under the GPL v2
12 May 2012; Martin Väth <martin@mvath.de>:
Created ChangeLog
@@ -74,3 +74,6 @@
27 Dec 2017; Martin Väth <martin@mvath.de>:
Remove meson_optional.eclass since meson.eclass in gentoo repository is fixed
+
+ 27 Jan 2018; Martin Väth <martin@mvath.de>:
+ mv_mozextension-r1.eclass: manifest.json: search "id" only inside "gecko"
diff --git a/eclass/mv_mozextension-r1.eclass b/eclass/mv_mozextension-r1.eclass
index 1f25a6a4..7062cd3a 100644
--- a/eclass/mv_mozextension-r1.eclass
+++ b/eclass/mv_mozextension-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 2017 Gentoo Foundation
+# Copyright 2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: mv_mozextension-r1.eclass
@@ -356,9 +356,10 @@ moz_getid() {
res=$(sed -n -e '/install-manifest/,$ '"${sub}" -- "${file}") || res=
else file=${dir}/manifest.json
test -f "${file}" || die "cannot find ${dir}/{install.rdf,manifest.json}"
- sub='^[[:space:]]*["'\''][iI][dD]["'\''][[:space:]]*:[[:space:]]*'
- sub=${sub}'["'\'']\(.*\)["'\''][[:space:]]*,\?[[:space:]]*$/\1'
- res=$(sed -n -e "s/${sub}/p" -- "${file}") || res=
+ sub='/^[[:space:]]*["'\'']gecko["'\''][[:space:]]*:/,/\}/s/'
+ sub=${sub}'^[[:space:]]*["'\'']id["'\''][[:space:]]*:[[:space:]]*'
+ sub=${sub}'["'\'']\(.*\)["'\''][[:space:]]*,\?[[:space:]]*$/\1/p'
+ res=$(sed -n -e "${sub}" -- "${file}") || res=
fi
[ -n "${res}" ] || die "failed to determine id from ${file}"
eval ${var}=\${res}