Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 693660 - sys-apps/portage Log git commit in /var/log/emerge.log
Summary: sys-apps/portage Log git commit in /var/log/emerge.log
Status: RESOLVED DUPLICATE of bug 482666
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: PMS/EAPI
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-07 09:37 UTC by Mike Lothian
Modified: 2020-12-08 13:16 UTC (History)
1 user (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 Mike Lothian 2019-09-07 09:37:59 UTC
Hi

Would it be possible to log the git commit of live ebuilds in /var/log/emerge.log?


It would make for easier bisecting when things fail rather than converting the unix time 

Thanks

Mike
Comment 1 Zac Medico gentoo-dev 2019-09-08 20:40:28 UTC
The git-r3.eclass would have to expose the commit information via some kind of standardized interface, which is closely related to bug 482666.

*** This bug has been marked as a duplicate of bug 482666 ***
Comment 2 Ulrich Müller gentoo-dev 2019-09-09 03:02:25 UTC
git-r3.eclass already logs that info:

GIT update -->
   repository:               https://anongit.gentoo.org/git/proj/eselect.git
   updating from commit:     0ff1f8eca0e85fbb4c0841490419e9ba3292aa2c
   to commit:                e47a5681b849c4b878ff795bf15de320103126a2

Or, if there aren't any new commits:

GIT update -->
   repository:               https://anongit.gentoo.org/git/proj/eselect.git
   at the commit:            e47a5681b849c4b878ff795bf15de320103126a2

The commit ID is also exported in the environment variable EGIT_VERSION. Other live eclasses export similar variables, see bug 311101 comment #6.
Comment 3 Zac Medico gentoo-dev 2019-09-09 05:17:33 UTC
So, until PMS provides a standard interface to expose this information, users will have to set PORTAGE_LOGDIR and get the commit information from the saved build logs.
Comment 4 Ulrich Müller gentoo-dev 2019-09-09 10:40:58 UTC
(In reply to Zac Medico from comment #3)
> So, until PMS provides a standard interface to expose this information,
> users will have to set PORTAGE_LOGDIR and get the commit information from
> the saved build logs.

"smart-live-rebuild -p" will also show the commit id of the installed package.