aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2023-04-28 17:04:30 +0200
committerSam James <sam@gentoo.org>2023-04-29 05:41:37 +0100
commite788ace298fbbe5d656b64ce75b9376b0ecb407a (patch)
tree28f93390ce09a2ea41be81699c79b790055e66f4
parentdispatch-conf: Avoid race when accessing log file (diff)
downloadportage-e788ace298fbbe5d656b64ce75b9376b0ecb407a.tar.gz
portage-e788ace298fbbe5d656b64ce75b9376b0ecb407a.tar.bz2
portage-e788ace298fbbe5d656b64ce75b9376b0ecb407a.zip
doebuild.py: PVR includes -r0 if explicitly specified
PMS says that PVR is "Package version and revision (if any)". https://projects.gentoo.org/pms/8/pms.html#x1-109001r1 Pkgcore and Paludis follow PMS, i.e. PVR includes an explicit -r0 (in other words, ${PF} is always equal to ${PN}-${PVR} for them). The previous logic for PVR had been added in 2001: https://gitweb.gentoo.org/archive/repo/gentoo-2.git/commit/?id=9aa2cf18b4de3c81fd5bc98718b2614bd2e73d23 Bug: https://bugs.gentoo.org/875362 Closes: https://github.com/gentoo/portage/pull/1028 Signed-off-by: Ulrich Müller <ulm@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--NEWS2
-rw-r--r--lib/portage/package/ebuild/doebuild.py8
-rw-r--r--man/ebuild.52
3 files changed, 5 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index 7239cc285..fe22e30ae 100644
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,8 @@ Bug fixes:
* All _E_*DESTTREE_ variables to renamed to __E_*DESTTREE, in order to move
them to the __* namespace which is reserved for the package manager.
+* The PVR variable includes -r0 if explicitly specified (bug #875362).
+
portage-3.0.46 (2023-04-07)
---------------
diff --git a/lib/portage/package/ebuild/doebuild.py b/lib/portage/package/ebuild/doebuild.py
index 380f8f98d..d30c6b8f0 100644
--- a/lib/portage/package/ebuild/doebuild.py
+++ b/lib/portage/package/ebuild/doebuild.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2021 Gentoo Authors
+# Copyright 2010-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
__all__ = ["doebuild", "doebuild_environment", "spawn", "spawnebuild"]
@@ -443,15 +443,11 @@ def doebuild_environment(
mysettings["PN"] = mysplit[0]
mysettings["PV"] = mysplit[1]
mysettings["PR"] = mysplit[2]
+ mysettings["PVR"] = mypv[len(mysplit[0]) + 1 :]
if noiselimit < 0:
mysettings["PORTAGE_QUIET"] = "1"
- if mysplit[2] == "r0":
- mysettings["PVR"] = mysplit[1]
- else:
- mysettings["PVR"] = mysplit[1] + "-" + mysplit[2]
-
# All temporary directories should be subdirectories of
# $PORTAGE_TMPDIR/portage, since it's common for /tmp and /var/tmp
# to be mounted with the "noexec" option (see bug #346899).
diff --git a/man/ebuild.5 b/man/ebuild.5
index 66c8518b3..fe70e40f5 100644
--- a/man/ebuild.5
+++ b/man/ebuild.5
@@ -371,7 +371,7 @@ Contains the revision number or 'r0' if no revision number exists.
.fi
.TP
.B PVR
-Contains the version number with the revision (if non-zero).
+Contains the version number with the revision (if any).
\fBExample\fR:
.nf