forked from pool/gobject-introspection
Accepting request 638596 from GNOME:Next
update gi-find-reqs.sh to support new Polari's imports.gi pattern OBS-URL: https://build.opensuse.org/request/show/638596 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gobject-introspection?expand=0&rev=190
This commit is contained in:
parent
314ea449e3
commit
9816a8e453
@ -46,7 +46,7 @@ done
|
|||||||
|
|
||||||
function gresources_requires {
|
function gresources_requires {
|
||||||
# GNOME is embedding .js files into ELF binaries for faster startup.
|
# GNOME is embedding .js files into ELF binaries for faster startup.
|
||||||
# As a result, we need to extract them and re'run the scanner over the
|
# As a result, we need to extract them and re-run the scanner over the
|
||||||
# embedded files.
|
# embedded files.
|
||||||
# We extract all the gresources embedded in ELF binaries and start
|
# We extract all the gresources embedded in ELF binaries and start
|
||||||
# gi-find-deps.sh recusively over the extracted file list.
|
# gi-find-deps.sh recusively over the extracted file list.
|
||||||
@ -87,6 +87,12 @@ function javascript_requires {
|
|||||||
split_name_version $module
|
split_name_version $module
|
||||||
print_req_prov
|
print_req_prov
|
||||||
done
|
done
|
||||||
|
# This is, at the moment, specifically for Polari where a "const { Foo, Bar } = imports.gi;" is used.
|
||||||
|
for module in $(grep -h -E -o "\{ \w+(: \w+|, \w+)+ \} = imports.gi;" $1 | \
|
||||||
|
sed -r -e '0,/\w+:\s\w+/ s/:\s\w+//g' -e 's: = imports.gi;:: ; s:\{ :: ; s: \}:: ; s/,//g'); do
|
||||||
|
split_name_version $module
|
||||||
|
print_req_prov
|
||||||
|
done
|
||||||
# Remember files which contain a pkg.require() call
|
# Remember files which contain a pkg.require() call
|
||||||
if pcregrep -M "pkg.require\\(([^;])*" $1 > /dev/null; then
|
if pcregrep -M "pkg.require\\(([^;])*" $1 > /dev/null; then
|
||||||
# the file contains a pkg.require(..) list... let's remember th is file for the in-depth scanner
|
# the file contains a pkg.require(..) list... let's remember th is file for the in-depth scanner
|
||||||
@ -173,7 +179,7 @@ function find_requires {
|
|||||||
# from gi.repository import foo, bar
|
# from gi.repository import foo, bar
|
||||||
# - in JS:
|
# - in JS:
|
||||||
# . imports.gi.foo; [unversioned requirement of 'foo']
|
# . imports.gi.foo; [unversioned requirement of 'foo']
|
||||||
# . imports.gi.goo-1.0; [versioned requirement]
|
# . imports.gi.foo-1.0; [versioned requirement of 'foo']
|
||||||
# . imports.gi.versions.Gtk = '3.0';
|
# . imports.gi.versions.Gtk = '3.0';
|
||||||
# . The imports can be listed on one line, and we catch them.
|
# . The imports can be listed on one line, and we catch them.
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 26 21:54:30 UTC 2018 - luc14n0@linuxmail.org
|
||||||
|
|
||||||
|
- Update gi-find-reqs.sh to support new Polari's imports.gi pattern
|
||||||
|
"const { Foo, Bar } = imports.gi;".
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Sep 19 18:38:47 UTC 2018 - antoine.belvire@opensuse.org
|
Wed Sep 19 18:38:47 UTC 2018 - antoine.belvire@opensuse.org
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user