Accepting request 142340 from GNOME:Factory

Push from G:F - Accerciser will need a rebuild, and then it helps with the have choice for typelib(Wnck)

OBS-URL: https://build.opensuse.org/request/show/142340
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gobject-introspection?expand=0&rev=47
This commit is contained in:
Stephan Kulow 2012-11-22 15:13:37 +00:00 committed by Git OBS Bridge
commit 8997a0c62a
7 changed files with 86 additions and 41 deletions

View File

@ -1,7 +1,7 @@
From ed8a690dbe738b3096f8d43bdbc627eb3f951523 Mon Sep 17 00:00:00 2001
From: Dominique Leuenberger <dimstar@opensuse.org>
Date: Tue, 6 Dec 2011 16:23:59 +0100
Subject: [PATCH] Bug 655672: g-ir-dep-scanner: Scan dependencies of a typelib
Subject: [PATCH] Bug 665672: g-ir-dep-scanner: Scan dependencies of a typelib
and give information.
This allows distributions to create automatic dependency tracking coming

View File

@ -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

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:85b9ac268d34311138f3c6bf646c07975eebfae6ae67d9239e1066a42c5d525b
size 1088672

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bc7948a35ce2218922dfb0806679cad21060715cc0c340cf7823eb633cc03429
size 1088768

View File

@ -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

View File

@ -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

View File

@ -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/