On Wed, 2011-02-09 at 18:49 -0800, Brock Pytlik wrote:
> Wow, really? Something imports __main__?

Yep - /usr/lib/python2.6/lib2to3/tests/test_*.py do.

> Anyway, the changes look good to me. The only question I had was that 
> the logic on lines 220 and 221 of depthlimited.py treat all Modules 
> without paths by ignoring them (effectively treating them like builtin 
> modules), while the code on lines 263-265 makes a distinction and 
> inserts paths when something isn't a builtin but has no paths. Frankly, 
> I don't remember why I added that logic in lines 263-265 (and going back 
> through my changelog wasn't informative either). It did make me want to 
> at least ask whether we wanted to (on lines 220, 221) treat modules 
> without paths like we (on lines 263-265) treat builtins, or like we 
> treat pathless modules.

Good point.  Adding that check seems like a better approach than having
pkgdepend stick its head in the sand.

I'll do that instead - if we're not a builtin, I'll return a ModuleInfo
with an empty path array, causing a "Missing file" error from pkgdepend
generate, which would require intervention on the part of the user to
pkgdepend bypass that file, or set a runpath.

        cheers,
                        tim


> Thanks for fixing this,
> Brock
> 
> On 02/ 9/11 05:30 PM, Tim Foster wrote:
> > Hi all,
> >
> > I've a short webrev here that I'd appreciate a code review of for
> >
> > 17858 pkgdepend generate hurls on some python modules
> >
> > http://cr.opensolaris.org/~timf/pkgdep-python-builtin-webrev/
> >
> > I wasn't able to come up with a simple test case to check the error
> > condition Norm was seeing where ImportErrors were being thrown by
> > modulefinder and depthlimitedmf.py wasn't dealing with them nicely.
> >
> > I have been able to run a version of pkgdend with these fixes against
> > the contents /usr/lib/python2.x on my desktop without problems however.
> >
> >     cheers,
> >                     tim
> >
> > _______________________________________________
> > pkg-discuss mailing list
> > [email protected]
> > http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
> 
> _______________________________________________
> pkg-discuss mailing list
> [email protected]
> http://mail.opensolaris.org/mailman/listinfo/pkg-discuss


_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to