From 46b25b8db537ed3d3037a57cdaaee6bab2e7d17dc4c46a59fc9ef7ad4bcb8450 Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Tue, 31 May 2011 08:01:33 +0000 Subject: [PATCH] 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 --- gi-find-deps.sh | 11 +++++++---- ...mplate => gobject-introspection-typelib.template | 0 gobject-introspection.changes | 13 +++++++++++++ gobject-introspection.spec | 6 +++--- 4 files changed, 23 insertions(+), 7 deletions(-) rename gobject-introspection-typlib.template => gobject-introspection-typelib.template (100%) diff --git a/gi-find-deps.sh b/gi-find-deps.sh index dd97bcd..f6e308e 100644 --- a/gi-find-deps.sh +++ b/gi-find-deps.sh @@ -8,10 +8,13 @@ function split_name_version { 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#*-} # 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 fi } @@ -56,13 +59,13 @@ 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 '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 print_req_prov done ;; *.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 print_req_prov done diff --git a/gobject-introspection-typlib.template b/gobject-introspection-typelib.template similarity index 100% rename from gobject-introspection-typlib.template rename to gobject-introspection-typelib.template diff --git a/gobject-introspection.changes b/gobject-introspection.changes index 0872895..357f331 100644 --- a/gobject-introspection.changes +++ b/gobject-introspection.changes @@ -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 diff --git a/gobject-introspection.spec b/gobject-introspection.spec index 582c1c7..0bf4a65 100644 --- a/gobject-introspection.spec +++ b/gobject-introspection.spec @@ -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. Source1: gi-find-deps.sh Source2: gobjectintrospection.attr -Source3: gobject-introspection-typlib.template +Source3: gobject-introspection-typelib.template Source99: %{name}-rpmlintrc BuildRequires: bison BuildRequires: fdupes @@ -55,9 +55,9 @@ a uniform, machine readable format. License: LGPLv2.1+ Summary: GObject Introspection Library 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. -%(cat %{S:3} | awk '{ print "Provides: " $1}') +%(cat %{S:3} | awk '{ print "Provides: " $0}') %description -n libgirepository-1_0-1 The goal of the project is to describe the APIs and collect them in