The way gate_hook.sh tries to find the proper package to install is
sub-optimal, and misses in case there is another package containing the
package name as a substring.
Updating the file to work the same way as in [1].
[1] c27bb1f190
Change-Id: I726f993ef9d593f13abef55fca6cc2c0a2d353c7