Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 20544 | Differences between
and this patch

Collapse All | Expand All

(-)portage.py.org (-3 / +23 lines)
Lines 1121-1127 Link Here
1121
					else:
1121
					else:
1122
						#we already have it downloaded, skip.
1122
						#we already have it downloaded, skip.
1123
						#if our file is bigger than the recorded size, digestcheck should catch it.
1123
						#if our file is bigger than the recorded size, digestcheck should catch it.
1124
						fetched=2
1124
                        # Unfortunately, for those who don't have a stable/continuous network
1125
                        # connection, this is too late--so check it NOW, while we're connected!
1126
						mymd5 = perform_md5(settings["DISTDIR"]+"/"+myfile)
1127
						if mymd5 != mydigests[myfile]["md5"]:
1128
							print "!!! Previously fetched file:",myfile,"MD5 FAILED! Refetching..."
1129
							os.unlink(settings["DISTDIR"]+"/"+myfile)
1130
							fetched=0
1131
						else:
1132
							print ">>> Previously fetched file:",myfile,"MD5 ;-)"
1133
							fetched=2
1134
							break #No need to keep looking for this file, we have it!
1125
				else:
1135
				else:
1126
					#we don't have the digest file, but the file exists.  Assume it is fully downloaded.
1136
					#we don't have the digest file, but the file exists.  Assume it is fully downloaded.
1127
					fetched=2
1137
					fetched=2
Lines 1160-1167 Link Here
1160
								except:
1170
								except:
1161
									pass
1171
									pass
1162
							continue
1172
							continue
1163
						fetched=2
1173
		                    # File is the correct size--check the MD5 sum for the fetched
1164
						break
1174
		                    # file NOW, for those users who don't have a stable/continuous
1175
		                    # net connection. This way we have a chance to try to download
1176
		                    # from another mirror...
1177
							mymd5=perform_md5(settings["DISTDIR"]+"/"+myfile)
1178
							if mymd5 != mydigests[myfile]["md5"]:
1179
								print "!!! Fetched file:",myfile,"MD5 FAILED! Removing corrupt distfile..."
1180
								os.unlink(settings["DISTDIR"]+"/"+myfile)
1181
								fetched=0
1182
							else:
1183
								print ">>>",myfile,"MD5 ;-)"
1184
								fetched=2
1165
					except (OSError,IOError),e:
1185
					except (OSError,IOError),e:
1166
						fetched=0
1186
						fetched=0
1167
				else:
1187
				else:

Return to bug 20544