[PATCH] Postinstall script ordering in setup - take 3
Igor Pechtchanski
pechtcha@cs.nyu.edu
Fri Mar 14 22:33:00 GMT 2003
Rob,
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
<http://www.sgi.com/tech/stl/LessThanComparable.html>
> 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.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.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
More information about the Cygwin-apps
mailing list