On Tue, 2007-03-27 at 17:01 -0500, Michael E Brown wrote: > All, > I am looking for feedback on the code below. Thanks. > > I am writing a yum plugin that will set up a hardware-specific yum > repo. Basically, this is just a repo with a baseurl or mirrorlist like > this: > baseurl=http://linux.dell.com/repo/hardware/system-$dellsysid > > The problem I have is that I will not have a repo for each and every > Dell system ever made... some system ids will come back as http 404. > This is not an error in this case because everything is just fine. But, > yum considers this an error and will not continue. > > My proposed solution to this is to have the following option in the > *.repo file: > disable_if_404={1,0} > > Then, in my plugin, I wrap the _loadRepoXML() method and call > .disable() if it throws an exception. The current code is below. > Everything appears to work just fine with one minor output detail that I > want to fix. > > 1) Does anybody have any objections to doing it this way? Is this the > best way to do this? > > 2) How do I supress the urlgrabber error output? I still get the > following error output even though everything appears to complete > successfully: >
How would the use distinguish b/t this repo doesn't exist and the site is down? How would yum? Why is having it return a 404 and not just an empty repo better? the url above could easily be a cgi with a redirect in it. If your systemid has a repo, it sends you there, if not it sends you to an empty repo. -sv _______________________________________________ Yum-devel mailing list [email protected] https://lists.dulug.duke.edu/mailman/listinfo/yum-devel
