public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] ebuild: only auto-generate manifest on first pass
@ 2013-04-16 15:58 Mike Frysinger
  2013-04-16 18:24 ` Zac Medico
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2013-04-16 15:58 UTC (permalink / raw
  To: gentoo-portage-dev

If you have FEATURES="digest" and run `ebuild` with multiple commands,
then portage will regenerate the Manifest before processing each one.
This can range from annoyingly to painfully slow depending on the package.

Since it's very unlikely for people to modify the ebuild while `ebuild`
is still running, have the manifest stage only auto-run with the first
command.  After that, automatically remove it from FEATURES.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 bin/ebuild | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/bin/ebuild b/bin/ebuild
index 876aaf7..14b1cd4 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -330,6 +330,8 @@ for arg in pargs:
 		a = portage.doebuild(ebuild, arg, settings=tmpsettings,
 			debug=debug, tree=mytree,
 			vartree=portage.db[portage.root]['vartree'])
+		# We only need to build digests on the first pass.
+		tmpsettings.features.discard('digest')
 	except KeyboardInterrupt:
 		print("Interrupted.")
 		a = 1
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [gentoo-portage-dev] [PATCH] ebuild: only auto-generate manifest on first pass
  2013-04-16 15:58 [gentoo-portage-dev] [PATCH] ebuild: only auto-generate manifest on first pass Mike Frysinger
@ 2013-04-16 18:24 ` Zac Medico
  0 siblings, 0 replies; 2+ messages in thread
From: Zac Medico @ 2013-04-16 18:24 UTC (permalink / raw
  To: gentoo-portage-dev

On 04/16/2013 08:58 AM, Mike Frysinger wrote:
> If you have FEATURES="digest" and run `ebuild` with multiple commands,
> then portage will regenerate the Manifest before processing each one.
> This can range from annoyingly to painfully slow depending on the package.
> 
> Since it's very unlikely for people to modify the ebuild while `ebuild`
> is still running, have the manifest stage only auto-run with the first
> command.  After that, automatically remove it from FEATURES.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

We already had some related code earlier in the file, so I've merged
your change in there:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8c67a81cdb17096fe2e64ad6fd0d9386da30cb85
-- 
Thanks,
Zac


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-16 18:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-16 15:58 [gentoo-portage-dev] [PATCH] ebuild: only auto-generate manifest on first pass Mike Frysinger
2013-04-16 18:24 ` Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox