Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 37498 - A package's install log is split across several files
Summary: A package's install log is split across several files
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 136244
  Show dependency tree
 
Reported: 2004-01-07 11:06 UTC by TGL
Modified: 2006-09-12 12:05 UTC (History)
0 users

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


Attachments
log_counter.patch (01--portage.py--log_counter.patch,3.34 KB, patch)
2004-01-07 11:07 UTC, TGL
Details | Diff
log_counter.patch (01--portage.py--log_counter.patch,2.96 KB, patch)
2004-01-14 06:44 UTC, TGL
Details | Diff
log_counter.patch (01--portage.py--log_counter.patch,2.92 KB, patch)
2004-01-22 10:20 UTC, TGL
Details | Diff
2.0.51.18-portage.py-log_counter.patch (2.0.51.18-portage.py-log_counter.patch,3.26 KB, patch)
2005-03-01 02:03 UTC, TGL
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description TGL 2004-01-07 11:06:02 UTC
Currently, when a package is emerged and then unmerged, it produce 3 logs files if PORT_LOGDIR is set:
 - one at build time (doebuild uses current global counter + 1)
 - one for preinst/postinst (global counter is increased, and then doebuild use current global counter + 1)
 - one for prerm/postrm on unmerge (current + 1 again)

I think a single log file is enough for a package life cycle. So I've made the following changes:
 - at build time, use "current + 1". This is still the default for doebuild.
 - at merge time, use the new current value. doebuild receive it from treewalk as an optionnal parameter.
 - at unmerge time, use the value from the db entry COUNTER file.

It works fine with emerge, but it's not perfect: you can break this scheme using ebuild. For instance:
 - ebuild foo/bar compile
 - emerge something/else
 - ebuild foo/bar install qmerge
will results in two log files for foo/bar. But I think that's still better than the current situation.

Reproducible: Always
Steps to Reproduce:
Comment 1 TGL 2004-01-07 11:07:16 UTC
Created attachment 23324 [details, diff]
log_counter.patch

This patch is against 2.0.50_pre10.
Comment 2 TGL 2004-01-14 06:44:53 UTC
Created attachment 23789 [details, diff]
log_counter.patch

Updated for 2.0.50_pre15.
Comment 3 TGL 2004-01-22 10:20:35 UTC
Created attachment 24248 [details, diff]
log_counter.patch

Updated for 2.0.50_pre19.
Comment 4 Brian Harring (RETIRED) gentoo-dev 2005-02-27 23:36:13 UTC
TGL, you up for updating this?
Comment 5 TGL 2005-03-01 02:03:50 UTC
Created attachment 52359 [details, diff]
2.0.51.18-portage.py-log_counter.patch

Here it is, with basically no change but a rediff. (Sure, i've checked that it
still makes sense and works, and it does. Actually, it seems that there had
been no change to the counter logic since 2.0.50.)
Comment 6 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-07-28 17:09:11 UTC
I want to say closed due to logging in CVS, jstubbs, this have potential for
entry into stable...or drop and say CVS logging from genone is good enough?
Comment 7 TGL 2005-07-28 17:50:32 UTC
What logging are you talking about? I've not followed CVS closely lately, but if
it's the e{info,warn,etc.} messages logging, it doesn't have much to do with
this patch. PORt_LOGDIR is a different beast. Could you precise what you mean?
Thanks.
Comment 8 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-07-28 19:04:09 UTC
/me didn't look at the patch closely enough apparently.

I see the behavior you describe in my own LOGDIR.
Comment 9 Jason Stubbs (RETIRED) gentoo-dev 2005-07-29 04:32:20 UTC
Personally, I prefer HEAD for this. It's more about abnormal behaviour than 
incorrect behaviour and there might be existing tools relying on the 
abnormality. 
Comment 10 Marius Mauch (RETIRED) gentoo-dev 2005-12-04 09:30:40 UTC
something for trunk?
Comment 11 Zac Medico gentoo-dev 2006-09-12 12:05:50 UTC
This is solved in 2.1.1.  Portage now uses the timestamp of ${PORTAGE_BUILDDIR}/.logid instead of the counter.  It was fixed in svn r3506 for bug 136285.