Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 428268 - PORT_LOGDIR split logs for pretend/merge/unmerge unnecessarily
Summary: PORT_LOGDIR split logs for pretend/merge/unmerge unnecessarily
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-27 07:32 UTC by Michał Górny
Modified: 2017-05-19 15:46 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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-07-27 07:32:58 UTC
If I'm upgrading a package which uses pkg_pretend(), I get three logfiles:

x11-drivers:xf86-input-synaptics-1.6.2:20120727-071032.log
x11-drivers:xf86-input-synaptics-1.6.2:20120727-071040.log
x11-drivers:xf86-input-synaptics-1.6.2:20120727-071120.log

The first one contains just the pkg_pretend() output. The second one contains the complete merge output (including unmerge of the older version), and the third one contains only the unmerge output.

I believe there's no good reason to keep those logs separate, and it will be beneficial to keep them as one. Especially that introducing multiple logfiles per build make it really painful to find the 'previous' or 'three builds earlier' log.
Comment 1 Zac Medico gentoo-dev 2012-07-28 00:29:24 UTC
The current behavior is implemented by linking the timestamp of $PORTAGE_BUILDDIR/.logid to log file that's named with the same timestamp. Since pkg_pretend and packages being unmerged each have a separate $PORTAGE_BUILDDIR, they get different logs.

In order to share a single log, then we'll have to replace $PORTAGE_BUILDDIR/.logid with some other approach. The nice thing about $PORTAGE_BUILDDIR/.logid is that it works across multiple invocations of ebuild(1) with the same build dir, and also works with emerge when FEATURES=keepwork is enabled.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-07-28 06:37:12 UTC
(In reply to comment #1)
> The current behavior is implemented by linking the timestamp of
> $PORTAGE_BUILDDIR/.logid to log file that's named with the same timestamp.
> Since pkg_pretend and packages being unmerged each have a separate
> $PORTAGE_BUILDDIR, they get different logs.

Hmm, but then why the unmerge output is in the 'middle' log as well?
Comment 3 Zac Medico gentoo-dev 2012-07-28 07:28:22 UTC
Unmerge has an entirely separate $PORTAGE_BUILDDIR, since it's a separate package instance with its own saved environment. It's located inside the $PORTAGE_TMPDIR/.unmerge directory.