Avoiding g-ir-scanner cache issues during compile

I was recently attempting to compile megatools 1.9.9.5 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>
    sys.exit(scanner_main(sys.argv))
  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
    accept_unprefixed=options.accept_unprefixed)
  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__
    self._check_cache_version()
  File "/usr/lib/gobject-introspection/giscanner/cachestore.py", line 103, in _check_cache_version
    self._clean()
  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
    os.unlink(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.

GI_SCANNER_DISABLE_CACHE=yes make

Hope this helps someone!