I don't think Gruyere should have holes (not sure what your first example is, but I don't think it's Gruyere, looks more like Jarlsberg or similar), and I've never come across one that does (and that's a sample of really quite a lot of Gruyere!). It’s the slightly more rubbery Emmental that has the holes, plus various cheap industrial substitutes.Odd that - because although the stuff I buy is nearly always unholey, sometimes it is holey!
View attachment 20389
Emmental is pretty much holier than that...
View attachment 20391
"What makes Swiss cheese “holey” is additional bacteria called Propionibacterium freudenrichii subspecies shermanii – P. shermanii for short."