After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747095 - Disable g-ir-scanner cache on build
Disable g-ir-scanner cache on build
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Linux
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-31 08:05 UTC by Edward Hervey
Modified: 2015-03-31 13:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
introspection: Don't use g-ir-scanner cache at compile time (4.16 KB, patch)
2015-03-31 09:17 UTC, Edward Hervey
none Details | Review
introspection: Don't use g-ir-scanner cache at compile time (9.03 KB, patch)
2015-03-31 09:21 UTC, Edward Hervey
none Details | Review
introspection: Don't use g-ir-scanner cache at compile time (2.73 KB, patch)
2015-03-31 09:26 UTC, Edward Hervey
accepted-commit_now Details | Review

Description Edward Hervey 2015-03-31 08:05:30 UTC
During compilation g-ir-scanner will use the user-local cache (.cache/g-ir-scanner/). The problem is that it can create conflicts like this : 

Traceback (most recent call last):
  • File "/usr/bin/g-ir-scanner", line 55 in <module>
    sys.exit(scanner_main(sys.argv))
  • File "/usr/lib/gobject-introspection/giscanner/scannermain.py", line 476 in scanner_main
    transformer = create_transformer(namespace, options)
  • File "/usr/lib/gobject-introspection/giscanner/scannermain.py", line 343 in create_transformer
    identifier_filter_cmd=options.identifier_filter_cmd)
  • File "/usr/lib/gobject-introspection/giscanner/transformer.py", line 54 in __init__
    self._cachestore = CacheStore()
  • File "/usr/lib/gobject-introspection/giscanner/cachestore.py", line 86 in __init__
    self._check_cache_version()
  • File "/usr/lib/gobject-introspection/giscanner/cachestore.py", line 122 in _check_cache_version
    shutil.move(versiontmp, version)
  • File "/usr/lib/python2.7/shutil.py", line 302 in move
    copy2(src, real_dst)
  • File "/usr/lib/python2.7/shutil.py", line 130 in copy2
    copyfile(src, dst)
  • File "/usr/lib/python2.7/shutil.py", line 82 in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/var/lib/jenkins/.cache/g-ir-scanner/.cache-version.tmp'
Makefile:2002: recipe for target 'Gst-1.0.gir' failed


We should just disable cache usage during compilation, it's only really needed for installed .gir/.typelib

This can be fixed by specifying GI_SCANNER_DISABLE_CACHE env variable for internal compilation
Comment 1 Edward Hervey 2015-03-31 09:17:38 UTC
Created attachment 300651 [details] [review]
introspection: Don't use g-ir-scanner cache at compile time

It pollutes user directories and we don't need to cache it
Comment 2 Edward Hervey 2015-03-31 09:21:47 UTC
Created attachment 300652 [details] [review]
introspection: Don't use g-ir-scanner cache at compile time

It pollutes user directories and we don't need to cache it
Comment 3 Edward Hervey 2015-03-31 09:26:03 UTC
Created attachment 300653 [details] [review]
introspection: Don't use g-ir-scanner cache at compile time

It pollutes user directories and we don't need to cache it
Comment 4 Nicolas Dufresne (ndufresne) 2015-03-31 13:39:27 UTC
Review of attachment 300653 [details] [review]:

Make sense.
Comment 5 Edward Hervey 2015-03-31 13:48:58 UTC
Pushed all.

Thanks