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

(-)eclean (+5 lines)
Lines 513-518 Link Here
513
	clean_dict = {}
513
	clean_dict = {}
514
	keep = []
514
	keep = []
515
	pkg_dict = {}
515
	pkg_dict = {}
516
	out = sys.stderr
516
517
517
	# create a big CPV->SRC_URI dict of packages whose distfiles should be kept
518
	# create a big CPV->SRC_URI dict of packages whose distfiles should be kept
518
	if (not destructive) or fetch_restricted:
519
	if (not destructive) or fetch_restricted:
Lines 554-561 Link Here
554
		except: continue
555
		except: continue
555
		if not stat.S_ISREG(file_stat[stat.ST_MODE]): continue
556
		if not stat.S_ISREG(file_stat[stat.ST_MODE]): continue
556
		if size_limit and (file_stat[stat.ST_SIZE] >= size_limit):
557
		if size_limit and (file_stat[stat.ST_SIZE] >= size_limit):
558
			print >>out, "Size: " + file
557
			continue
559
			continue
558
		if time_limit and (file_stat[stat.ST_MTIME] >= time_limit):
560
		if time_limit and (file_stat[stat.ST_MTIME] >= time_limit):
561
			print >>out, "Time: " + file
559
			continue
562
			continue
560
		if 'garbage' in exclude_dict:
563
		if 'garbage' in exclude_dict:
561
			# Try to match file name directly
564
			# Try to match file name directly
Lines 570-581 Link Here
570
						break
573
						break
571
574
572
			if file_match:
575
			if file_match:
576
				print >>out, "Exclusion: " + file
573
				continue
577
				continue
574
		# this is a candidate for cleaning
578
		# this is a candidate for cleaning
575
		clean_dict[file]=[filepath]
579
		clean_dict[file]=[filepath]
576
	# remove files owned by some protected packages
580
	# remove files owned by some protected packages
577
	for my_cpv in pkg_dict:
581
	for my_cpv in pkg_dict:
578
		for file in file_regexp.findall(pkg_dict[my_cpv]+"\n"):
582
		for file in file_regexp.findall(pkg_dict[my_cpv]+"\n"):
583
			print >>out, my_cpv + ": " + file
579
			if file in clean_dict:
584
			if file in clean_dict:
580
				del clean_dict[file]
585
				del clean_dict[file]
581
		# no need to waste IO time if there is nothing left to clean
586
		# no need to waste IO time if there is nothing left to clean

Return to bug 163588