Skip to content
  • Christoph Reiter's avatar
    windows: rework loaders cache relocation support · 6ef31828
    Christoph Reiter authored
    Relocation works by recognizing paths in the loaders cache
    which start with the built time prefix and extract the relative
    path from that.
    
    This leads to the following problem when updating the cache:
    
    In case the package is build on another machine one has to
    either match the build directory layout or adjust the
    cache by hand for the resulting cache to stay relocatable.
    
    This commonly occurs with msys2 where mostly pre-build packages
    are used which are built on another machine and the cache gets
    generated at install time. Another case is updating the cache
    in a separate deployment environment.
    
    This patch takes the package installation directory as a base
    and writes relative paths into the cache when relocation
    is enabled. When loading the cache a relative path is made
    absolute by prepending the package base again.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776081
    6ef31828