Bug 301001

Summary: python-virtinst and virt-inst use presence of /Fedora in distro root as confirmation that distro is Fedora
Product: [Fedora] Fedora Reporter: Michael Carney <mwc>
Component: python-virtinstAssignee: Daniel Berrangé <berrange>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 8   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-09-21 18:47:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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 ***