Accepting request 71895 from home:dimstar:branches:Base:System

More gi-scan-fixes... now also fix totem-plugins requiring weird stuff

OBS-URL: https://build.opensuse.org/request/show/71895
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gobject-introspection?expand=0&rev=50
This commit is contained in:
Vincent Untz 2011-05-31 08:01:33 +00:00 committed by Git OBS Bridge
parent e257168b83
commit 46b25b8db5
4 changed files with 23 additions and 7 deletions

View File

@ -8,10 +8,13 @@
function split_name_version { function split_name_version {
base=$1 base=$1
symbol=${base%-*} tsymbol=${base%-*}
# Sometimes we get a Requires on Gdk.Settings.foo, bebause you can directly use imports.gi.Gdk.Settings.Foo in Javascript.
# We know that the symbol in this case is call Gdk, so we cut everything after the . away.
symbol=$(echo $tsymbol | awk -F. '{print $1}')
version=${base#*-} version=${base#*-}
# In case there is no '-' in the filename, then the split above 'fails' and version == symbol (thus: no version specified) # In case there is no '-' in the filename, then the split above 'fails' and version == symbol (thus: no version specified)
if [ "$symbol" = "$version" ]; then if [ "$tsymbol" = "$version" ]; then
unset version unset version
fi fi
} }
@ -56,13 +59,13 @@ function find_requires {
while read file; do while read file; do
case $file in case $file in
*.js) *.js)
for module in $(grep -h -P -o "imports.gi.([^\s;]+)" $file | grep -v "imports.gi.version" | sed 's,imports.gi.,,'); do for module in $(grep -h -P -o "imports.gi.([^\s'\";]+)" $file | grep -v "imports.gi.version" | sed 's,imports.gi.,,'); do
split_name_version $module split_name_version $module
print_req_prov print_req_prov
done done
;; ;;
*.py) *.py)
for module in $(grep -h -P "from gi.repository import (\w+)" $file | sed -e 's,from gi.repository import,,' -r -e 's:\s+as\s+\w+::g' -e 's:,::g'); do for module in $(grep -h -P "from gi.repository import (\w+)" $file | sed 's:#.*::' | sed -e 's,from gi.repository import,,' -r -e 's:\s+as\s+\w+::g' -e 's:,::g'); do
split_name_version $module split_name_version $module
print_req_prov print_req_prov
done done

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Sat May 28 15:41:02 UTC 2011 - dimstar@opensuse.org
- Minor fixes on gi-find-deps.sh:
+ quotes are not allowed symbols in an import name. Fixes for
example gnome-shell Requiring typelib(').
+ The typelib Symbol is not supposed to contain a dot [.]. Should
we find a Requires / Provides that does, then we know we were
cought in some code using it direcly as an object. The Typelib
symbol in this case is the first token before the first dot.
+ Ignore anything after # in python parsing (it's a comment).
- Provide the template based typelib() versioned.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri May 27 10:07:14 UTC 2011 - dimstar@opensuse.org Fri May 27 10:07:14 UTC 2011 - dimstar@opensuse.org

View File

@ -29,7 +29,7 @@ Source0: %{name}-%{version}.tar.bz2
# gi-find-deps.sh is a rpm helper for Provides and Requires. Script creates typelib()-style Provides/Requires. # gi-find-deps.sh is a rpm helper for Provides and Requires. Script creates typelib()-style Provides/Requires.
Source1: gi-find-deps.sh Source1: gi-find-deps.sh
Source2: gobjectintrospection.attr Source2: gobjectintrospection.attr
Source3: gobject-introspection-typlib.template Source3: gobject-introspection-typelib.template
Source99: %{name}-rpmlintrc Source99: %{name}-rpmlintrc
BuildRequires: bison BuildRequires: bison
BuildRequires: fdupes BuildRequires: fdupes
@ -55,9 +55,9 @@ a uniform, machine readable format.
License: LGPLv2.1+ License: LGPLv2.1+
Summary: GObject Introspection Library Summary: GObject Introspection Library
Group: Development/Libraries/GNOME Group: Development/Libraries/GNOME
# Provide typelib() symbols based on gobject-introspection-typlib.template # Provide typelib() symbols based on gobject-introspection-typelib.template
# The template is checked during install if it matches the installed *.typelib files. # The template is checked during install if it matches the installed *.typelib files.
%(cat %{S:3} | awk '{ print "Provides: " $1}') %(cat %{S:3} | awk '{ print "Provides: " $0}')
%description -n libgirepository-1_0-1 %description -n libgirepository-1_0-1
The goal of the project is to describe the APIs and collect them in The goal of the project is to describe the APIs and collect them in