Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 304981 - =sys-apps/portage-2.2_rc62 replaces 'temp/build.log' just after 'checking checksums'
Summary: =sys-apps/portage-2.2_rc62 replaces 'temp/build.log' just after 'checking che...
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-13 22:53 UTC by Michał Górny
Modified: 2010-03-02 22:28 UTC (History)
0 users

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


Attachments
truncate fetch log after success (truncate_log.patch,645 bytes, patch)
2010-02-14 00:59 UTC, Zac Medico
Details | Diff

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 2010-02-13 22:53:21 UTC
Whenever package is merged, portage-2.2_rc62 first outputs messages like:
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]

to the 'temp/build.log' file inside tempdir. But afterwards it replaces that file with new log, starting with:

 * CPV:  media-fonts/font-util-9999
 * REPO: x11
 * USE:  amd64 elibc_glibc kernel_linux multilib userland_GNU

I think that the 'CPV' part and below should be appended to the logfile instead. That would be especially useful when using 'tail -f' on logfiles.
Comment 1 Zac Medico gentoo-dev 2010-02-13 23:20:17 UTC
The fetch code removes it upon success, since it's irrelevant at that point. I guess we can truncate the log instead of removing it.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-02-13 23:43:42 UTC
(In reply to comment #1)
> The fetch code removes it upon success, since it's irrelevant at that point. I
> guess we can truncate the log instead of removing it.

I would appreciate that.
Comment 3 Zac Medico gentoo-dev 2010-02-14 00:59:52 UTC
Created attachment 219551 [details, diff]
truncate fetch log after success

Save as /tmp/truncate_log.patch and apply as follows:

  patch /usr/lib/portage/pym/_emerge/EbuildBuildDir.py /tmp/truncate_log.patch
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-02-14 23:05:01 UTC
The patch doesn't fix the issue. Neither does replacing the whole function with 'pass'. Portage is still first removing the logfile, and then whole 'temp' directory before starting the real build.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-02-16 14:22:40 UTC
Ok, as AFAICS there's no simple possibility of resolving the issue, I assume the best option would be to revert the change and close the bug. I've switched my script into inotify, and it's indeed simpler to just catch file removal/creation than truncation.
Comment 6 Zac Medico gentoo-dev 2010-03-02 22:28:06 UTC
Ok, I've reverted it to the old behavior in svn r15722.