Gentoo Archives: gentoo-portage-dev

From: Jason Stubbs <jstubbs@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [Bug 110386] Unable to remerge any package with -K (rc5 and rc6)
Date: Sat, 29 Oct 2005 04:20:10
Message-Id: 200510291320.37249.jstubbs@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [Bug 110386] Unable to remerge any package with -K (rc5 and rc6) by Zac Medico
1 On Friday 28 October 2005 19:35, Zac Medico wrote:
2 > Brian Harring wrote:
3 > > On Thu, Oct 27, 2005 at 11:50:02PM +0900, Jason Stubbs wrote:
4 > >>On Wednesday 26 October 2005 23:56, Jason Stubbs wrote:
5 > >>>I've attached a quickly thrown together patch for it, which works here,
6 > >>> but we really need to get this whole thing down pat. Perhaps usage of
7 > >>> doebuild without specifying tree should be deprecated and the code
8 > >>> audited for any usage without it? Making tree a keyword parameter will
9 > >>> break too many external things so that's not really an option...
10 > >>
11 > >>Updated patch; I missed a call to merge(). I really don't like this patch
12 > >>though because it touches way too much stuff. Anybody have any ideas for
13 > >> a better way of doing it?
14 > >
15 > > Offhand, don't pass mytree around like that; pass it into the
16 > > constructor, assign to the obj's namespace, and have treelink pass the
17 > > saved value into doebuild.
18 > >
19 > > That's how I did it in 2.1 at least; been a long while, but don't
20 > > recall any major issues with that route. Plus side, heck of a lot
21 > > less modification to methods signatures, just the objects behaviour.
22 > > ~harring
23 >
24 > I adapted Jason's patch to go along with the dblink.treetype bit from 2.1
25 > and it seems to work alright. The only notable difference from Jason's
26 > patch is that tree=self.treetype is passed into doebuild in any case for
27 > preinst and postinst (following the lead of 2.1).
28
29 If tree wasn't being passed to doebuild in my earlier patch, it was only
30 because I missed those instances. Using an instance member is much better
31 though. I should have picked up that most of the changes were in dblink...
32
33 I've adjusted the patch a bit to make all method signature changes into
34 keyword arguments. I've also change the default tree to None and added a
35 warning message to doebuild when None is passed and defaulting it to tree
36 there. With the EAPI changes, passing a tree is really a requirement. If a
37 tree isn't passed, it'd be better to alert people to that rather than trying
38 to backtrack to it as the cause of the bugs that will inevitably pop up.
39
40 So are we just about ready on this one?
41
42 --
43 Jason Stubbs

Attachments

File name MIME type
dblink-treetype.patch text/x-diff

Replies