Check-in [c88a4bcf20]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:hace un stat del fichero al momento de la descarga para una prueba de consistencia mas rapida
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:c88a4bcf20539437f71e94004703348a236508db
User & Date: developer 2017-09-18 16:53:21
Context
2017-09-18
23:32
optimiza -o check-in: 92a8a867e2 user: developer tags: trunk
16:53
hace un stat del fichero al momento de la descarga para una prueba de consistencia mas rapida check-in: c88a4bcf20 user: developer tags: trunk
2017-09-11
15:12
un repo estaba deshabilitado innecesariamente check-in: 209ae2a7cd user: developer tags: trunk
Changes

Changes to sync_void.

149
150
151
152
153
154
155

156
157
158
159
160
161
162
...
248
249
250
251
252
253
254



255
256
257
258
259
260
261
262
...
267
268
269
270
271
272
273

274
275
276
277
278
279
280
				else
					rm "$name.sum"
				fi
			fi

			if xz -qqt $name; then
				md5sum "$name" | cut -d" " -f1 > "$name.sum"

				total=$((total+sz))
				n=$((n+1))
			fi
		elif endswith $name sig && isaccepted $name; then
			sig_total=$((sig_total+1))
			[ -f "$name" ] || continue
			if [ `wc -c "$name" | cut -d" " -f1` = 512 ]; then
................................................................................
#          2 (falla en la descarga)
#          3 (falla en la comprobacion)
#          4 (solicita reinicio del ciclo de descarga masiva
#          5 (success, no fue necesario descargar)
download() {
	if [ -e "$1" ]; then
		if endswith $1 xbps; then



			if [ -f "$1.sum" ]; then
				expected_sum=`cat "$1.sum"`
				sum=`md5sum $1 | cut -d" " -f1`
				[ "$sum" = "$expected_sum" ] && return 5
			fi
			xz -t $1 && return 5

		elif endswith $1 sig; then
................................................................................
		fi
	fi

	echo comenzando descarga de "$f"
	if aria2c --summary-interval=0 -k 1M "$CURRENT/$1" "$CA/$1" "$CB/$1" "$CC/$1" "$CD/$1" "$CE/$1";then
		if endswith $1 xbps && xz -qqt $1; then
			md5sum $1 | cut -d" " -f1 > "$1.sum"

			return 0
		fi
		return 3
	else
		while true; do
			log "descarga de $1 ha fallado o sido interrumpida."
			echo -n "Reintentar (r), Ignorar (i) Finalizar (q) Pausar (p)? "







>







 







>
>
>
|







 







>







149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
...
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
...
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
				else
					rm "$name.sum"
				fi
			fi

			if xz -qqt $name; then
				md5sum "$name" | cut -d" " -f1 > "$name.sum"
				stat "$name" > "$name.stat"
				total=$((total+sz))
				n=$((n+1))
			fi
		elif endswith $name sig && isaccepted $name; then
			sig_total=$((sig_total+1))
			[ -f "$name" ] || continue
			if [ `wc -c "$name" | cut -d" " -f1` = 512 ]; then
................................................................................
#          2 (falla en la descarga)
#          3 (falla en la comprobacion)
#          4 (solicita reinicio del ciclo de descarga masiva
#          5 (success, no fue necesario descargar)
download() {
	if [ -e "$1" ]; then
		if endswith $1 xbps; then
			if [ -f "$1.stat" ]; then
				[ "$(stat $1)" = "$(cat $1.stat)" ] && return 5

			elif [ -f "$1.sum" ]; then
				expected_sum=`cat "$1.sum"`
				sum=`md5sum $1 | cut -d" " -f1`
				[ "$sum" = "$expected_sum" ] && return 5
			fi
			xz -t $1 && return 5

		elif endswith $1 sig; then
................................................................................
		fi
	fi

	echo comenzando descarga de "$f"
	if aria2c --summary-interval=0 -k 1M "$CURRENT/$1" "$CA/$1" "$CB/$1" "$CC/$1" "$CD/$1" "$CE/$1";then
		if endswith $1 xbps && xz -qqt $1; then
			md5sum $1 | cut -d" " -f1 > "$1.sum"
			stat $1 > "$1.stat"
			return 0
		fi
		return 3
	else
		while true; do
			log "descarga de $1 ha fallado o sido interrumpida."
			echo -n "Reintentar (r), Ignorar (i) Finalizar (q) Pausar (p)? "