Gentoo Archives: gentoo-portage-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] [PATCH] ebuild: only auto-generate manifest on first pass
Date: Tue, 16 Apr 2013 15:56:49
Message-Id: 1366127925-14749-1-git-send-email-vapier@gentoo.org
1 If you have FEATURES="digest" and run `ebuild` with multiple commands,
2 then portage will regenerate the Manifest before processing each one.
3 This can range from annoyingly to painfully slow depending on the package.
4
5 Since it's very unlikely for people to modify the ebuild while `ebuild`
6 is still running, have the manifest stage only auto-run with the first
7 command. After that, automatically remove it from FEATURES.
8
9 Signed-off-by: Mike Frysinger <vapier@g.o>
10 ---
11 bin/ebuild | 2 ++
12 1 file changed, 2 insertions(+)
13
14 diff --git a/bin/ebuild b/bin/ebuild
15 index 876aaf7..14b1cd4 100755
16 --- a/bin/ebuild
17 +++ b/bin/ebuild
18 @@ -330,6 +330,8 @@ for arg in pargs:
19 a = portage.doebuild(ebuild, arg, settings=tmpsettings,
20 debug=debug, tree=mytree,
21 vartree=portage.db[portage.root]['vartree'])
22 + # We only need to build digests on the first pass.
23 + tmpsettings.features.discard('digest')
24 except KeyboardInterrupt:
25 print("Interrupted.")
26 a = 1
27 --
28 1.8.1.2

Replies