This is the mail archive of the 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] Postinstall script ordering in setup - take 3


I have to run now, so I'll reply in more detail tomorrow.  One quick
comment below.

On 15 Mar 2003, Robert Collins wrote:

> The logic in here looks almost identical to that in
> packageversion::set_requirements. I don't want to add near-duplicate
> code if we can avoid it. Perhaps extracting the core for both to a
> convenience class?
> Your operator > and < appear to have a problem.
> foo: bar
> gam: bar
> foo > gam    = false
> gam < foo    = false
> gam == foo   = false.
> I'd expect stl associative containers to choke on that.
> I suggest you do
> {
>   /* we are greater than any dependency of ours */
>   if (_dependencies.find(&f) != _dependencies.end())
>     return true;
>   return _path > f._path;
> }

Not really.  I read up on that specifically.  stl containers only need a
*partial* order.  What you're suggesting will create a total order.  Not
an error, but overkill.  The sort function is supposed to be stable and
keep the original order if the lessThan relation is undefined.  See

> Thanks again for all the work you've put into this.
> I've actually got some time today (gasp!), so I'm going to review the
> current install script ordering - I'd like to apply your work to the
> package dependency script ordering, which is currently not implemented.
> Rob

Go ahead.  If you need my input, feel free to send chunks of design/code
to the list; I'll reply to them and to the rest of this message tomorrow.
      |\      _,,,---,,_		pechtcha at cs dot nyu dot edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor at watson dot ibm dot com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune

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