diff options
author | Fabian Groffen <grobian@gentoo.org> | 2022-01-26 08:21:40 +0100 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2022-01-26 08:21:40 +0100 |
commit | 78bc2780900963532f21545b65fe0c6a91379fa7 (patch) | |
tree | c0d719bea87720018b33696e8e27f06edac4c3ec /sys-apps | |
parent | autotools.eclass: sync with ::gentoo (diff) | |
download | prefix-78bc2780900963532f21545b65fe0c6a91379fa7.tar.gz prefix-78bc2780900963532f21545b65fe0c6a91379fa7.tar.bz2 prefix-78bc2780900963532f21545b65fe0c6a91379fa7.zip |
sys-apps/portage-3.0.30.1: add interrevisions patch
Closes: https://bugs.gentoo.org/832062
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/portage/files/portage-3.0.30-interrevisions.patch | 68 | ||||
-rw-r--r-- | sys-apps/portage/portage-3.0.30.1.ebuild | 1 |
2 files changed, 69 insertions, 0 deletions
diff --git a/sys-apps/portage/files/portage-3.0.30-interrevisions.patch b/sys-apps/portage/files/portage-3.0.30-interrevisions.patch new file mode 100644 index 0000000000..e53fbd233a --- /dev/null +++ b/sys-apps/portage/files/portage-3.0.30-interrevisions.patch @@ -0,0 +1,68 @@ +https://bugs.gentoo.org/832062 + +add (back) inter-revision support for Prefix Portage + +--- a/lib/portage/versions.py ++++ b/lib/portage/versions.py +@@ -53,7 +53,9 @@ + } + + _v = r"(\d+)((\.\d+)*)([a-z]?)((_(pre|p|beta|alpha|rc)\d*)*)" +-_rev = r"\d+" ++# PREFIX_LOCAL hack: -r(\d+) -> -r(\d+|\d+\.\d+) (see below) ++_rev = r"(\d+|\d+\.\d+)" ++# END_PREFIX_LOCAL + _vr = _v + "(-r(" + _rev + "))?" + + _cp = { +@@ -287,15 +289,47 @@ + if rval: + return rval + +- # the suffix part is equal to, so finally check the revision ++ # PREFIX_LOCAL ++ # The suffix part is equal too, so finally check the revision ++ # Prefix hack: historically a revision starting with 0 was an ++ # 'inter-revision', which means that it is possible to create ++ # revisions on revisions. An example is -r01.1 which is the ++ # first revision of -r1. Note that a period (.) is used to ++ # separate the real revision and the secondary revision number. ++ # In the current state, the leading 0 is no longer used, and ++ # versions just can have a dot, which means the version is an ++ # inter-revision. ++ # This trick is in use to allow revision bumps in ebuilds synced ++ # from the main tree for Prefix changes, while still staying in ++ # the main tree versioning scheme. As such it can be used in ++ # any other overlay where ebuilds from the another tree are ++ # shadowed. + if match1.group(9): +- r1 = int(match1.group(9)) ++ if '.' in match1.group(9): ++ t = match1.group(9).split(".") ++ r1 = int(t[0]) ++ r3 = int(t[1]) ++ else: ++ r1 = int(match1.group(9)) ++ r3 = 0 + else: + r1 = 0 ++ r3 = 0 + if match2.group(9): +- r2 = int(match2.group(9)) ++ if '.' in match2.group(9): ++ t = match2.group(9).split(".") ++ r2 = int(t[0]) ++ r4 = int(t[1]) ++ else: ++ r2 = int(match2.group(9)) ++ r4 = 0 ++ # END_PREFIX_LOCAL + else: + r2 = 0 ++ r4 = 0 ++ if r1 == r2 and (r3 != 0 or r4 != 0): ++ r1 = r3 ++ r2 = r4 + rval = (r1 > r2) - (r1 < r2) + return rval + diff --git a/sys-apps/portage/portage-3.0.30.1.ebuild b/sys-apps/portage/portage-3.0.30.1.ebuild index 88a5cd8eac..90eda9f188 100644 --- a/sys-apps/portage/portage-3.0.30.1.ebuild +++ b/sys-apps/portage/portage-3.0.30.1.ebuild @@ -100,6 +100,7 @@ python_prepare_all() { eapply "${FILESDIR}"/${PN}-3.0.30-prefix-stack.patch # 658572 eapply "${FILESDIR}"/${PN}-3.0.30-ebuildshell.patch # 155161 + eapply "${FILESDIR}"/${PN}-3.0.30-interrevisions.patch # 832062 if use gentoo-dev; then einfo "Disabling --dynamic-deps by default for gentoo-dev..." sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \ |