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

Andy Koppe andy.koppe@gmail.com
Fri Aug 6 21:58:00 GMT 2010


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


More information about the Cygwin-apps mailing list