better pattern matching for package names
pull back in not_if check from upstream