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

Collapse All | Expand All

(-)a/pym/portage/cache/flat_hash.py (-4 / +1 lines)
Lines 29-35 class database(fs_template.FsBased): Link Here
29
		try:
29
		try:
30
			myf = codecs.open(fp, mode='r', encoding='utf_8', errors='replace')
30
			myf = codecs.open(fp, mode='r', encoding='utf_8', errors='replace')
31
			try:
31
			try:
32
				d = self._parse_data(myf, cpv)
32
				d = self._parse_data(myf.readlines(), cpv)
33
				if '_mtime_' not in d:
33
				if '_mtime_' not in d:
34
					# Backward compatibility with old cache
34
					# Backward compatibility with old cache
35
					# that uses mtime mangling.
35
					# that uses mtime mangling.
Lines 87-93 class database(fs_template.FsBased): Link Here
87
			os.remove(fp)
87
			os.remove(fp)
88
			raise cache_errors.CacheCorruption(cpv, e)
88
			raise cache_errors.CacheCorruption(cpv, e)
89
89
90
91
	def _delitem(self, cpv):
90
	def _delitem(self, cpv):
92
#		import pdb;pdb.set_trace()
91
#		import pdb;pdb.set_trace()
93
		try:
92
		try:
Lines 98-108 class database(fs_template.FsBased): Link Here
98
			else:
97
			else:
99
				raise cache_errors.CacheCorruption(cpv, e)
98
				raise cache_errors.CacheCorruption(cpv, e)
100
99
101
102
	def __contains__(self, cpv):
100
	def __contains__(self, cpv):
103
		return os.path.exists(os.path.join(self.location, cpv))
101
		return os.path.exists(os.path.join(self.location, cpv))
104
102
105
106
	def __iter__(self):
103
	def __iter__(self):
107
		"""generator for walking the dir struct"""
104
		"""generator for walking the dir struct"""
108
		dirs = [self.location]
105
		dirs = [self.location]
(-)a/pym/portage/cache/metadata.py (-1 lines)
Lines 34-40 class database(flat_hash.database): Link Here
34
34
35
	def _parse_data(self, data, cpv):
35
	def _parse_data(self, data, cpv):
36
		_hashed_re_match = self._hashed_re.match
36
		_hashed_re_match = self._hashed_re.match
37
		data = list(data)
38
		d = {}
37
		d = {}
39
38
40
		for line in data:
39
		for line in data:

Return to bug 276813