There are two fixes involved. The first simply attempts to remount the ISO. The second deletes the ISO (fragment?) before attempting to redownload the same image.
Here's the patch:
root@vmstudio:/opt/vmware/lib/build/VADK# diff -u /opt/vmware/lib/build/VADK/bkp/ISO.pm /opt/vmware/lib/build/VADK/ISO.pm
--- /opt/vmware/lib/build/VADK/bkp/ISO.pm 2009-10-08 10:20:37.000000000 +0000
+++ /opt/vmware/lib/build/VADK/ISO.pm 2009-10-08 13:23:59.000000000 +0000
@@ -77,6 +77,12 @@
#
my $already_mounted = `mount | cut -f3 -d' ' | fgrep $mountpoint`;
+# Will: simply remount it if possible
+if (!$already_mounted && (-f $filename)) {
+ &mount($filename, $mountpoint);
+ $already_mounted = `mount | cut -f3 -d' ' | fgrep $mountpoint`;
+}
+
if (!$already_mounted) {
if ($iso =~ /^(ht|f)tp:(.+)$/i) {
@@ -90,7 +96,12 @@
if (-r $envFile) {
$wgetcmd = ". $envFile; ";
}
- $wgetcmd .= 'cd '.$stageDir.'; wget '.VADK::Constants::WGET_TIMEOUT.' '.$iso;
+
+# Will: fix re-download attempts (were saving with .index extension)
+unlink($filename);
+$wgetcmd .= 'cd '.$stageDir.'; wget'.$iso;
+
+ # $wgetcmd .= 'cd '.$stageDir.'; wget '.VADK::Constants::WGET_TIMEOUT.' '.$iso;
my $ret = VADK::System::systemWrapped($wgetcmd);
if ($ret->{'exit_value'}) {
I also stripped out the retry and timeout arguments to wget as they were causing wget to abort on a peer reset instead of continuing with a new connection.
If you've run into this problem do delete all the files in the download ISO cache:
rm -vf /opt/vmware/cache/build/ISO/*
No comments:
Post a Comment