Since you're grabbing these from globus, might as well dig into its keg instead of depending on it being linked into the prefix:

```ruby
globus = Formula.factory('globus-toolkit')

core = `"#{globus}/sbin/gpt-query" globus_core`
flavor = case core
when /gcc64dbg/ then "gcc64dbg"
when /gcc32dbg/ then "gcc32dbg"
end
```

That'll also leave you a formula object to reuse later, e.g. in the configure args.

As for having an empty flavour, is it really realistic that globus-toolkit could build successfully but be broken like that?