This patch is for /usr/lib/portage/pym/portage.py and adds some code so it will append to /var/log/ebuild.log (easily changable) for most actions. The log will look similar to something like this: 20020306.150925: Ebuild: clean on /usr/portage/app-misc/gentoo/gentoo-0.11.18.ebuild 20020306.150925: Ebuild: merge on /usr/portage/app-misc/gentoo/gentoo-0.11.18.ebuild 20020306.152115: Ebuild: unmerge on /var/db/pkg/app-misc/rox-1.1.8-r2/rox-1.1.8-r2.ebuild 20020306.152116: Ebuild: prerm on //var/db/pkg/app-misc/rox-1.1.8-r2/rox-1.1.8-r2.ebuild 20020306.152116: Ebuild: postrm on //var/db/pkg/app-misc/rox-1.1.8-r2/rox-1.1.8-r2.ebuild A handy use for this is when you want to get the system back to a previous state (after you find out some package that installed 50 libraries sucks ;)), you can see what dependencys were installed when you installed a package. Let me know what you think, Thanks, Nathaniel <nathaniel37@yahoo.com> --- portage.py.orig Wed Mar 6 15:05:45 2002 +++ portage.py Wed Mar 6 15:09:21 2002 @@ -76,6 +76,9 @@ import shutil import xpak import re +import time + +elogfi='/var/log/ebuild.log' # master category list. Any new categories should be added to this list to # ensure that they all categories are read when we check the portage directory @@ -688,6 +691,10 @@ a=open(settings["T"]+"/src_uri_all","w") a.write(flatten(alluris)) a.close() + + logfi = open(elogfi,'a') + logfi.write('%s: Ebuild: %s on %s\n' % (time.strftime('%Y%m%d.%H%M%S',ti me.localtime(time.time())),mydo,myebuild)); + logfi.close(); if mydo=="unpack": if settings["MAINTAINER_noauto"]=="1":
pretty neat :)
*** Bug 1646 has been marked as a duplicate of this bug. ***
Might as well convert this bug to a general request for emerge to support logging...
*** Bug 6084 has been marked as a duplicate of this bug. ***
basic logging will be in 2.0.42
*** Bug 11360 has been marked as a duplicate of this bug. ***
review /var/log/emerge.log