Bug 301001 - python-virtinst and virt-inst use presence of /Fedora in distro root as confirmation that distro is Fedora
Summary: python-virtinst and virt-inst use presence of /Fedora in distro root as confi...
Keywords:
Status: CLOSED DUPLICATE of bug 273781
Alias: None
Product: Fedora
Classification: Fedora
Component: python-virtinst
Version: 8
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Daniel Berrangé
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-21 18:42 UTC by Michael Carney
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-09-21 18:47:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michael Carney 2007-09-21 18:42:43 UTC
Description of problem: All versions of Fedora and RHEL virt-inst /
python-virtinst use the presence of a /Fedora directory in the distro as
confirmation that it's dealing with a Fedora distro. Since 7.91 has renamed
/Fedora to /Packages, this logic no longer works, and <= 7.91 distros running on
dom0 will not be able to use the virt* suite to install 7.91 guests.

There really should be a more sophisticated method to determine if a distro is
Fedora, rather than using a directory name. A special "release" file containing
useful tokens is a much better method. Regardless of what is finally decided,
the virt* code still needs to consider the original "/Fedora" logic in order to
install older Fedora xen guests.

Version-Release number of selected component (if applicable):
python-virtinst-0.200.0-3.fc7 (where I first noticed the problem). It actually
affects *all* versions.


How reproducible: ALWAYS


Steps to Reproduce:
1. Simply try to install a F8test2 from *any* version of a Fedora or RHEL dom0
and watch it fail.
2.
3.
  
Actual results:
Install fails with "Invalid file location given: No such file or directory"


Expected results:
Xen guest install succeeds.


Additional info:

To confirm the problem, I made the following change to:
/usr/lib/python2.5/site-packages/virtinst/DistroManager.py

*** DistroManager.py.ORIG       2007-09-21 07:35:45.000000000 -0700
--- DistroManager.py    2007-09-21 07:54:18.000000000 -0700
***************
*** 210,216 ****
  # Fedora distro check
  class FedoraImageStore(RedHatImageStore):
      def isValidStore(self, fetcher, progresscb):
!         if fetcher.hasFile("Fedora", progresscb):
              logging.debug("Detected a Fedora distro")
              return True
          return False
--- 210,216 ----
  # Fedora distro check
  class FedoraImageStore(RedHatImageStore):
      def isValidStore(self, fetcher, progresscb):
!         if fetcher.hasFile("Packages", progresscb):
              logging.debug("Detected a Fedora distro")
              return True
          return False

and the F8test2 install started right up.

Comment 1 Daniel Berrangé 2007-09-21 18:47:36 UTC

*** This bug has been marked as a duplicate of 273781 ***


Note You need to log in before you can comment on or make changes to this bug.