Brock Pytlik wrote:

> >  - It could just be a slow brain, but this modifies the fmris in the
> >    catalog itself, right?  Wait, fmris() uses the old catalog file, so
> >    how does this work at all?
> From catalog.py, the comment from the fmris function says:
> 
> A generator function that produces FMRIs as it iterates over the contents of 
> the catalog.

Yeah, but then it opens a "catalog" file and proceeds to treat it as a v0
catalog.  Which kinda worries me.  But if you're getting valid data from
this, then I guess it's working and I just don't understand how.  Unless
you can explain what's going on here, I'll want Shawn to weigh in.  I do
know there's still a bit of vestigial catalog code, and some which is used
only for v0 catalogs, and I'm not sure how fmris() is classified.

> fmris calls __parse_entry which creates a new pkg fmri and returns it.
> Now, if there's a concern that we're caching these implictly somehow or
> using a singleton pattern with them, I can have what will be called
> "remove_publisher" return a copy of the fmri with the publisher removed,
> but unless something fancy is going on under the covers, I don't see the
> concern here.

Assuming that fmris() is pulling from a useful data source, then I agree,
there's no problem using the fmri objects it generates.

Danek
_______________________________________________
pkg-discuss mailing list
pkg-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to