* [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/, /, man/
@ 2023-04-29 4:44 Sam James
0 siblings, 0 replies; only message in thread
From: Sam James @ 2023-04-29 4:44 UTC (permalink / raw
To: gentoo-commits
commit: e788ace298fbbe5d656b64ce75b9376b0ecb407a
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 28 15:04:30 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 29 04:41:37 2023 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e788ace2
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 <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>
NEWS | 2 ++
lib/portage/package/ebuild/doebuild.py | 8 ++------
man/ebuild.5 | 2 +-
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-29 4:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-29 4:44 [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/, /, man/ Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox