On Thu, 2005-06-30 at 09:48 +0200, Hans-Peter Jansen wrote: > Am Donnerstag, 30. Juni 2005 07:19 schrieb Adrian Reber: > > > > I just did the same and had to install libxml2 and libxml2-python > > from FC4 manually to fix this problem. > > > > I found the cause of this problem by starting python and importing > > yum: > > > > $ python > > > > >>> import yum > > > > The error message I was then getting indicated that it was a problem > > with libxml2. > > Same here. While this is obviously a packaging problem (missing > dependancy), I propose the following patch to make the reason > transparent for the casual user. While at it, respect a sane line > length limit on output. > > --- bin/yum.py.orig 2005-06-30 09:26:32.296304798 +0200 > +++ bin/yum.py 2005-06-30 09:38:31.812382427 +0200 > @@ -3,10 +3,17 @@ > try: > import yum > except ImportError: > - print >> sys.stderr, "The yum libraries do not seem to be available \ > -on your system for this version of python ", sys.version > - print >> sys.stderr, "Please make sure the package you used to install \ > -yum was built for your install of python." > + print >> sys.stderr, """\ > +The yum libraries do not seem to be available on your system > +for this version of python: %s > + > +Please make sure the package you used to install yum was built > +for your install of python. > + > +The error leading to this problem was: > +""" % sys.version > + raise > + # paranoia exit > sys.exit(1) > > sys.path.insert(0, '/usr/share/yum-cli') > > Seth, what do you think? > I think that the whole reason for catching the import exception was to avoid printing the traceback. So putting it back in seems a bit backward to me. Now if you were to modify that to point out the specific import modules that failed to import and print that information nicely, then that might be merged. -sv