Rewriting .pc file paths breaks using at runtime
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
During staging, snapcraft rewrites *.pc files to prepend the stage directory onto the "prefix" path variable (done in PluginHandler.stage: https://github.com/snapcore/snapcraft/blob/master/snapcraft/internal/pluginhandler/__init__.py#L471). This rewrite is not reverted before snapping, breaking the .pc files at runtime (discovered when trying to run https://github.com/ros-simulation/gazebo_ros_pkgs/blob/kinetic-devel/gazebo_ros/scripts/gzserver#L26)
(Note that the absolute paths in the *.pc files would still cause runtime issues unless using something like https://github.com/sergiusens/snapcraft-preload)
Evaluation history
No evaluation history available.