From d9b5cdcfd12532d97f92c89af10df3c9634c2418a7ed61d9c09c0a33df0d7fa8 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 14 Nov 2012 15:43:43 +0000 Subject: [PATCH] Accepting request 141178 from GNOME:Next resubmit with file requires... OBS-URL: https://build.opensuse.org/request/show/141178 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gobject-introspection?expand=0&rev=110 --- gi-find-deps.sh | 90 ++++++++++++++++----------- gobject-introspection-1.34.1.1.tar.xz | 3 - gobject-introspection-1.34.2.tar.xz | 3 + gobject-introspection.changes | 23 +++++++ gobject-introspection.spec | 4 +- gobjectintrospection.attr | 2 +- 6 files changed, 85 insertions(+), 40 deletions(-) delete mode 100644 gobject-introspection-1.34.1.1.tar.xz create mode 100644 gobject-introspection-1.34.2.tar.xz diff --git a/gi-find-deps.sh b/gi-find-deps.sh index 8915011..cb7536a 100644 --- a/gi-find-deps.sh +++ b/gi-find-deps.sh @@ -39,6 +39,49 @@ while read file; do done } +function python_requires { + for module in $(grep -h -P "from gi.repository import (\w+)" $1 | sed -e 's:#.*::' -e 's:raise ImportError.*::' | sed -e 's,from gi.repository import,,' -r -e 's:\s+$::g' -e 's:\s+as\s+\w+::g' -e 's:,: :g'); do + split_name_version $module + print_req_prov + done + for module in $(grep -h -P -o "(gi.require_version\(['\"][^'\"]+['\"],\s*['\"][^'\"]+['\"]\))" $1 | sed -e 's:gi.require_version::' -e "s:[()\"' ]::g" -e 's:,:-:'); do + split_name_version $module + print_req_prov + done +} + +function javascript_requires { + for module in $(grep -h -P -o "imports.gi.([^\s'\";]+)" $1 | grep -v "imports.gi.version" | sed -r -e 's,\s+$,,g' -e 's,imports.gi.,,'); do + split_name_version $module + print_req_prov + done + for module in $(grep -h -P -o "imports.gi.versions.([^\s'\";]+)\s*=\s*['\"].+['\"]" $1 | \ + sed -e 's:imports.gi.versions.::' -e "s:['\"]::g" -e 's:=:-:' -e 's: ::g'); do + split_name_version $module + print_req_prov + done + +} + +function typelib_requires { + split_name_version $(basename $1 | sed 's,.typelib$,,') + oldIFS=$IFS + IFS=$'\n' + for req in $(g-ir-dep-tool $symbol $version); do + case $req in + typelib:*) + module=${req#typelib: } + split_name_version $module + print_req_prov + ;; + shlib:*) + echo "${req#shlib: }${shlib_64}" + ;; + esac + done + IFS=$oldIFS +} + function find_requires { # Currently, we detect: # - in python: @@ -57,43 +100,20 @@ function find_requires { while read file; do case $file in *.js) - for module in $(grep -h -P -o "imports.gi.([^\s'\";]+)" $file | grep -v "imports.gi.version" | sed -r -e 's,\s+$,,g' -e 's,imports.gi.,,'); do - split_name_version $module - print_req_prov - done - for module in $(grep -h -P -o "imports.gi.versions.([^\s'\";]+)\s*=\s*['\"].+['\"]" $file | \ - sed -e 's:imports.gi.versions.::' -e "s:['\"]::g" -e 's:=:-:' -e 's: ::g'); do - split_name_version $module - print_req_prov - done + javascript_requires "$file" ;; - *.py) - for module in $(grep -h -P "from gi.repository import (\w+)" $file | sed -e 's:#.*::' -e 's:raise ImportError.*::' | sed -e 's,from gi.repository import,,' -r -e 's:\s+$::g' -e 's:\s+as\s+\w+::g' -e 's:,: :g'); do - split_name_version $module - print_req_prov - done - for module in $(grep -h -P -o "(gi.require_version\(['\"][^'\"]+['\"],\s*['\"][^'\"]+['\"]\))" $file | sed -e 's:gi.require_version::' -e "s:[()\"' ]::g" -e 's:,:-:'); do - split_name_version $module - print_req_prov - done + *.py) + python_requires "$file" ;; - *.typelib) - split_name_version $(basename $file | sed 's,.typelib$,,') - oldIFS=$IFS - IFS=$'\n' - for req in $(g-ir-dep-tool $symbol $version); do - case $req in - typelib:*) - module=${req#typelib: } - split_name_version $module - print_req_prov - ;; - shlib:*) - echo "${req#shlib: }${shlib_64}" - ;; - esac - done - IFS=$oldIFS + *.typelib) + typelib_requires "$file" + ;; + *) + case $(file -b $file) in + Python\ script*) + python_requires "$file" + ;; + esac ;; esac done diff --git a/gobject-introspection-1.34.1.1.tar.xz b/gobject-introspection-1.34.1.1.tar.xz deleted file mode 100644 index d7995c2..0000000 --- a/gobject-introspection-1.34.1.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:85b9ac268d34311138f3c6bf646c07975eebfae6ae67d9239e1066a42c5d525b -size 1088672 diff --git a/gobject-introspection-1.34.2.tar.xz b/gobject-introspection-1.34.2.tar.xz new file mode 100644 index 0000000..5e95215 --- /dev/null +++ b/gobject-introspection-1.34.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc7948a35ce2218922dfb0806679cad21060715cc0c340cf7823eb633cc03429 +size 1088768 diff --git a/gobject-introspection.changes b/gobject-introspection.changes index 8823186..daeb733 100644 --- a/gobject-introspection.changes +++ b/gobject-introspection.changes @@ -1,3 +1,26 @@ +------------------------------------------------------------------- +Tue Nov 13 14:33:07 UTC 2012 - dimstar@opensuse.org + +- Refactored gi-find-deps.sh: the various requires extraction + methods are split in functions, which allows to execute the same + function on different patterns. This helps us insofar as we need + to be able to check files in /usr/bin and want to habe them + processed the same way as other files. Needed for example by + accerciser, where /usr/bin/accerciser is a python script with + stricter gi requirements (Wcnk 3.0). +- Add /usr/bin/* to fileattrs to be checked for dependencies. At + the moment, gi-find-deps.sh only treats python scripts found like + this. +- Add file Requires: gi-find-deps makes use of file to identify + the file types. + +------------------------------------------------------------------- +Tue Nov 13 07:48:09 UTC 2012 - dimstar@opensuse.org + +- Update to version 1.34.2: + + gimarshallingtests: Fix return data type. + + scanner: correctly handle large 64bit integer constants. + ------------------------------------------------------------------- Wed Oct 17 20:49:31 UTC 2012 - dimstar@opensuse.org diff --git a/gobject-introspection.spec b/gobject-introspection.spec index 0ced75b..ad8543d 100644 --- a/gobject-introspection.spec +++ b/gobject-introspection.spec @@ -17,7 +17,7 @@ Name: gobject-introspection -Version: 1.34.1.1 +Version: 1.34.2 Release: 0 # FIXME: when bgo#629930 gets fixed, move the appropriate pkg-config files to the main package and rename the devel package to libgirepository-devel Summary: GObject Introspection Tools @@ -48,6 +48,8 @@ BuildRequires: pkgconfig(gobject-2.0) BuildRequires: gnome-common BuildRequires: gtk-doc %endif +# gi-find-deps makes use of 'file' to identify the types. +Requires: file Requires: libgirepository-1_0-1 = %{version} Requires: python-xml BuildRoot: %{_tmppath}/%{name}-%{version}-build diff --git a/gobjectintrospection.attr b/gobjectintrospection.attr index 43574cc..03d1413 100644 --- a/gobjectintrospection.attr +++ b/gobjectintrospection.attr @@ -1,4 +1,4 @@ %__gobjectintrospection_provides %{_rpmconfigdir}/gi-find-deps.sh -P %__gobjectintrospection_requires %{_rpmconfigdir}/gi-find-deps.sh -R -%__gobjectintrospection_path ^(%{_libdir}/.*\.typelib)|(.*\.py)|(.*\.js)$ +%__gobjectintrospection_path ^(%{_libdir}/.*\.typelib)|(.*\.py)|(.*\.js)|(%{_bindir}/.*)$ %__gobjectintrospection_exclude_path ^/usr/share/doc/packages/