This makes all transitive deps build before top level deps, ensuring the
minimum rebuild for the project when a software changes.
On Mar 18, 2014 6:39 PM, "Serdar Sutay" <notifications@github.com> wrote:

> In lib/omnibus/library.rb:
>
> > @@ -27,7 +27,24 @@ def initialize(project)
> >      end
> >
> >      def component_added(component)
> > -      @components << component unless @components.include?(component)
> > +      unless @components.find { |c| c.name == component.name }
> > +        @components << component
> > +      end
> > +    end
> > +
> > +    def build_order
> > +      head = []
> > +      tail = []
> > +      @components.each do |component|
> > +        if head.length == 0
> > +          head << component
> > +        elsif @project.dependencies.include?(component.name)
>
> Probably I'm missing something but why? Looks like we're traversing the
> dependency map depth first in the recursively_load_dependency function.
> At this point components should be "the" build_order no?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/opscode/omnibus-ruby/pull/105/files#r10734261>
> .
>