[Travis] Simplidy the package/stack detection.