On 11/20/2009 09:39 AM, Chris Lumens wrote: >>> +def deviceMatches(spec): >>> + matches = udev_resolve_glob(spec) >>> + dev = udev_resolve_devspec(spec) >>> + >>> + # udev_resolve_devspec returns None if there's no match, but we don't >>> + # want that ending up in the list. >>> + if dev: >>> + matches.append(dev) >> >> Shouldn't the above be something like 'if dev and dev not in matches:' >> instead? > > My thinking was that we should try both methods for resolving the spec > we're given. However, maybe there's no reason you'd ever get a glob > that's also a valid disk name so I don't need to do this. > >> Also, about the udev_trigger... it would be nice if we could only do >> that as often as is really necessary, especially for larger systems, but >> that probably doesn't rank very high among our other sins. > > Agreed. I wonder if we can get away with doing this only once early on. > Alternatively, we could do some sort of caching thing like so: Well, I think you can, for example, name an mpath device 'foo*' in kickstart in the rhel branch (and that functionality is going to come back to master at some point relatively soon) But frankly, if you do that, and you're using globbing, you deserve what you get. -- Peter I hope you know that this will go down on your permanent record. _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list