summaryrefslogtreecommitdiffstats
path: root/image.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2001-01-09 22:30:06 +0000
committerErik Troan <ewt@redhat.com>2001-01-09 22:30:06 +0000
commit2869d26d0514b155e77f6648306222b3d8185a9c (patch)
tree6fda54b7a75bb37372832bb37eb176bab4da7728 /image.py
parent120dfa035ec0fdd71db6c1043e4d6022b649aee7 (diff)
downloadanaconda-2869d26d0514b155e77f6648306222b3d8185a9c.tar.gz
anaconda-2869d26d0514b155e77f6648306222b3d8185a9c.tar.xz
anaconda-2869d26d0514b155e77f6648306222b3d8185a9c.zip
compare contents of disk images
Diffstat (limited to 'image.py')
-rw-r--r--image.py29
1 files changed, 22 insertions, 7 deletions
diff --git a/image.py b/image.py
index b2238661c..cc66905a0 100644
--- a/image.py
+++ b/image.py
@@ -75,11 +75,16 @@ class CdromInstallMethod(ImageInstallMethod):
elif h[1000002] != self.currentDisc:
timer.stop()
+ key = ".disc%d-%s" % (self.currentDisc, iutil.getArch())
+ f = open("/mnt/source/" + key)
+ timestamp = f.readline()
+ f.close()
+
self.currentDisc = h[1000002]
isys.umount("/mnt/source")
done = 0
- key = ".disc%d-%s" % (self.currentDisc, iutil.getArch())
+ key = "/mnt/source/.disc%d-%s" % (self.currentDisc, iutil.getArch())
cdlist = []
for (dev, something, descript) in \
@@ -91,9 +96,14 @@ class CdromInstallMethod(ImageInstallMethod):
try:
if not isys.mount(dev, "/mnt/source", fstype = "iso9660",
readOnly = 1):
- if os.access("/mnt/source/%s" % key, os.O_RDONLY):
- done = 1
- else:
+ if os.access(key, os.O_RDONLY):
+ f = open(key)
+ newStamp = f.readline()
+ f.close()
+ if newStamp == timestamp:
+ done = 1
+
+ if not done:
isys.umount("/mnt/source")
except:
pass
@@ -112,9 +122,14 @@ class CdromInstallMethod(ImageInstallMethod):
isys.mount(self.device, "/mnt/source",
fstype = "iso9660", readOnly = 1)
- if os.access("/mnt/source/%s" % key, os.O_RDONLY):
- done = 1
- else:
+ if os.access(key, os.O_RDONLY):
+ f = open(key)
+ newStamp = f.readline()
+ f.close()
+ if newStamp == timestamp:
+ done = 1
+
+ if not done:
self.messageWindow(_("Wrong CDROM"),
_("That's not the correct Red Hat CDROM."))
isys.umount("/mnt/source")