Avoiding g-ir-scanner cache issues during compile

I was recently attempting to compile megatools for my UbuntuNAS and ran into an issue with g-ir-scanner during the make

Traceback (most recent call last):
  File "/usr/bin/g-ir-scanner", line 46, in <module>
  File "/usr/lib/gobject-introspection/giscanner/scannermain.py", line 470, in scanner_main
    transformer = create_transformer(namespace, options)
  File "/usr/lib/gobject-introspection/giscanner/scannermain.py", line 337, in create_transformer
  File "/usr/lib/gobject-introspection/giscanner/transformer.py", line 53, in __init__
    self._cachestore = CacheStore()
  File "/usr/lib/gobject-introspection/giscanner/cachestore.py", line 83, in __init__
  File "/usr/lib/gobject-introspection/giscanner/cachestore.py", line 103, in _check_cache_version
  File "/usr/lib/gobject-introspection/giscanner/cachestore.py", line 148, in _clean
    self._remove_filename(os.path.join(self._directory, filename))
  File "/usr/lib/gobject-introspection/giscanner/cachestore.py", line 130, in _remove_filename
OSError: [Errno 21] Is a directory: '/home/edude03/.cache/g-ir-scanner/.AppleDouble'
make[1]: *** [Mega-1.0.gir] Error 1
make: *** [all] Error 2

It seems that g-ir-scanner creates a cache for its self in my home directory which is also shared via Netatalk to my Mac, which creates a file that the make script isn’t expecting.

To get around this issue, I simply built megatools with g-ir-caching disabled since there was no reason to use the cache for a new one-off build anyway.


Hope this helps someone!