Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 219837
Collapse All | Expand All

(-)bin/emerge-webrsync (-3 / +7 lines)
Lines 308-318 Link Here
308
}
308
}
309
309
310
do_latest_snapshot() {
310
do_latest_snapshot() {
311
	local attempts=-1
311
	local attempts=0
312
	local r=1
312
	local r=1
313
313
314
	vecho "Fetching most recent snapshot ..."
314
	vecho "Fetching most recent snapshot ..."
315
315
316
	# The snapshot for a given day is generated at 01:45 UTC on the following
317
	# day, so the current day's snapshot (going by UTC time) hasn't been
318
	# generated yet.  Therefore, always start by looking for the previous day's
319
	# snapshot (for attempts=1, subtract 1 day from the current UTC time).
316
	while (( ${attempts} <  40 )) ; do
320
	while (( ${attempts} <  40 )) ; do
317
		local day
321
		local day
318
		local month
322
		local month
Lines 326-334 Link Here
326
		day=$(get_date_part ${utc_attempt} "%d")
330
		day=$(get_date_part ${utc_attempt} "%d")
327
		month=$(get_date_part ${utc_attempt} "%m")
331
		month=$(get_date_part ${utc_attempt} "%m")
328
		year=$(get_date_part ${utc_attempt} "%Y")
332
		year=$(get_date_part ${utc_attempt} "%Y")
329
		utc_midnight=$(get_date_part $(expr ${utc_attempt} - ${utc_attempt} % 86400) "%s")
333
		utc_midnight=$(expr ${utc_attempt} - ${utc_attempt} % 86400)
330
334
331
		if [ ${utc_midnight} -lt $(($(get_portage_timestamp)-86400)) ]; then
335
		if [ ${utc_midnight} -lt $(get_portage_timestamp) ]; then
332
			wecho "portage content is newer than available snapshots (use --revert option to overide)"
336
			wecho "portage content is newer than available snapshots (use --revert option to overide)"
333
			r=0
337
			r=0
334
			break
338
			break

Return to bug 219837