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

Collapse All | Expand All

(-)/usr/lib/portage/pym/portage/update.py (-1 / +6 lines)
Lines 45-51 Link Here
45
		# EAPI (characters allowed in package names may vary).
45
		# EAPI (characters allowed in package names may vary).
46
		if old_value in mycontent and isvalidatom(new_value, eapi=eapi):
46
		if old_value in mycontent and isvalidatom(new_value, eapi=eapi):
47
			old_value = re.escape(old_value);
47
			old_value = re.escape(old_value);
48
			mycontent = re.sub(old_value+"(:|$|\\s)", new_value+"\\1", mycontent)
48
			# move slotted
49
			mycontent = re.sub(old_value + ":", new_value + ":", mycontent)
50
			# move plain category/package (keep self-blocks in mind #367215)
51
			mycontent = re.sub("(^|[^!])" + old_value + "($|\\s)", "\\1" + new_value + "\\2", mycontent)
49
			def myreplace(matchobj):
52
			def myreplace(matchobj):
50
				# Strip slot and * operator if necessary
53
				# Strip slot and * operator if necessary
51
				# so that ververify works.
54
				# so that ververify works.
Lines 55-61 Link Here
55
					return "%s-%s" % (new_value, matchobj.group(2))
58
					return "%s-%s" % (new_value, matchobj.group(2))
56
				else:
59
				else:
57
					return "".join(matchobj.groups())
60
					return "".join(matchobj.groups())
61
			# move with version specification
58
			mycontent = re.sub("(%s-)(\\S*)" % old_value, myreplace, mycontent)
62
			mycontent = re.sub("(%s-)(\\S*)" % old_value, myreplace, mycontent)
63
59
	elif update_cmd[0] == "slotmove" and update_cmd[1].operator is None:
64
	elif update_cmd[0] == "slotmove" and update_cmd[1].operator is None:
60
		pkg, origslot, newslot = update_cmd[1:]
65
		pkg, origslot, newslot = update_cmd[1:]
61
		old_value = "%s:%s" % (pkg, origslot)
66
		old_value = "%s:%s" % (pkg, origslot)

Return to bug 367215