def parse_alpm_dict(blob):
	"""
	Parse a blob of text as ALPM file.
	The results are returned as a dictionary with each key having a list of values.
	"""
	result = {}
	key    = None
	values = []
	for line in blob.splitlines():
		if len(line) == 0: continue

		if line[0] == '%' and line[-1] == '%':
			if key is not None: result[key] = values
			key         = line[1:-1]
			values      = []
		else:
			values.append(line)
	if key is not None: result[key] = values
	return result