This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Stop automatic dependency selection on setup.exe chooser screen


On 6 August 2010 22:43, Andy Koppe wrote:
> On 6 August 2010 21:08, Corinna Vinschen wrote:
>> + Â Â Âfor (n = unmet.begin (); n != unmet.end (); ++n)
>> + Â Â Â {
>> + Â Â Â Â if (!(*n).first->prereq_checked ())
>> + Â Â Â Â Â {
>> + Â Â Â Â Â Â (*n).first->prereq_checked (true);
>> + Â Â Â Â Â Â for (vector <vector <PackageSpecification *> *>::iterator i =
>> + Â Â Â Â Â Â Â Â Â(*n).first->curr.depends ()->begin ();
>> + Â Â Â Â Â Â Â Â Âi < (*n).first->curr.depends ()->end (); ++i)
>> + Â Â Â Â Â Â Â {
>> + Â Â Â Â Â Â Â Â PackageSpecification *spec = (*i)->at(0);
>> + Â Â Â Â Â Â Â Â packagemeta *pack = db.findBinary (*spec);
>> + Â Â Â Â Â Â Â Â if (!pack)
>> + Â Â Â Â Â Â Â Â Â continue;
>> + Â Â Â Â Â Â Â Â if (pack->desired && spec->satisfies (pack->desired))
>> + Â Â Â Â Â Â Â Â Â ;
>> + Â Â Â Â Â Â Â Â else if (unmet.find (pack) == unmet.end ())
>> + Â Â Â Â Â Â Â Â Â {
>> + Â Â Â Â Â Â Â Â Â Â foundUnmet2ndLevel = true;
>> + Â Â Â Â Â Â Â Â Â Â unmet[pack].push_back ((*n).first);
>> + Â Â Â Â Â Â Â Â Â }
>> + Â Â Â Â Â Â Â }
>> + Â Â Â Â Â }
>
> Hang on, I don't think iterating over 'unmet' while inserting elements
> into it is valid, because it's a map (i.e. probably a binary tree).

Actually, it is valid, but we'll miss out on any packages that happen
to be inserted before the iterator, which of course is why
'foundUnmet2ndLevel' is there.

Andy

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]