Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 895908 - sys-apps/portage: expose git revision in emerge --info for 9999
Summary: sys-apps/portage: expose git revision in emerge --info for 9999
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 908971
Blocks:
  Show dependency tree
 
Reported: 2023-02-22 17:20 UTC by Sam James
Modified: 2023-08-29 07:37 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-22 17:20:35 UTC
[2023-01-03T00:11:19+0000] <@floppym> sam_: If you run bin/emerge --version directly from portage.git, it outputs X_pY as the version, where X is the latest portage-* tag and Y is the number of commits on the branch since that tag.
[2023-01-03T00:11:35+0000] <@floppym> sam_: For portage-9999, it just uses whatever is in setup.py at the time of install.
[2023-01-03T00:12:28+0000] <@floppym> Might be possible to add similar code to setup.py for the live ebuild.
[2023-01-03T00:13:16+0000] <@floppym> See VERSION in lib/portage/__init__.py.

This would let 'emerge --info' show nice output when installed via portage-9999 in the ebuild.

When we run it from git, we see:
```
$ bin/emerge --info | head -1
Portage 3.0.44_p39 (python 3.11.2-final-0, default/linux/amd64/17.1/hardened, gcc-13, glibc-2.37, 6.1.12-gentoo-dist-hardened x86_64)
```

Note the "_p39".
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-02 15:34:54 UTC
This is fixed by the Meson version (thanks Chewi!)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-02 15:35:25 UTC
We may still want to switch to e.g. gnulib's git-version-gen, but I'll handle that if we're going to do it.
Comment 3 Larry the Git Cow gentoo-dev 2023-08-09 02:57:31 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=858dfd771ac4c6c9315ac5851f4aeeb233fc21d5

commit 858dfd771ac4c6c9315ac5851f4aeeb233fc21d5
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-08-09 02:54:12 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-09 02:54:12 +0000

    sys-apps/portage: add 3.0.50
    
    Closes: https://bugs.gentoo.org/908971
    Closes: https://bugs.gentoo.org/640658
    Closes: https://bugs.gentoo.org/894398
    Closes: https://bugs.gentoo.org/895908
    Closes: https://bugs.gentoo.org/909067
    Closes: https://bugs.gentoo.org/909148
    Closes: https://bugs.gentoo.org/909853
    Closes: https://bugs.gentoo.org/910035
    Closes: https://bugs.gentoo.org/910376
    Closes: https://bugs.gentoo.org/911594
    Closes: https://bugs.gentoo.org/911574
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.50.ebuild | 229 +++++++++++++++++++++++++++++++++
 2 files changed, 230 insertions(+)