Comment # 7 on bug 1191351 from
(In reply to Markus Elfring from comment #6)
> (In reply to Knut Alejandro Anderssen Gonz������lez from comment #5)
> > Ok, I was trying to reproduce the error and was able to raise the same
> > exception in a console:
> 
> Thanks for such a constructive feedback.
> 
> 
> > So apparently the problem is cause by products which do not have the "path"
> > attribute which should be optional:
> 
> I would wonder why this questionable attribute access was reported as a call
> of an ���������undefined method���������.
> Will any test cases be extended accordingly?

(In reply to Markus Elfring from comment #4)
> I imagine that another source code inspection can help for the desired
> clarification of the reported issue.
> 
> At which code places is it tried so far to call the method ���������path���������
> (eventually also for the class ���������Y2Packager::Resolvable���������)?


It uses meta-programming to expose the attribute methods, in our case, there is
some products data information that is filled here:

https://github.com/yast/yast-packager/blob/master/src/lib/y2packager/installation_data.rb#L63

As it is documented in the Resolvable class, not all the attributes are
mandatory because resolvable works with different kind of resolvable objects,
and that is why path is optional and should exist only with packages and
products as stated here:

https://github.com/yast/yast-yast2/blob/master/library/packages/src/lib/y2packager/resolvable.rb#L142

But as the Product mentioned before (openSUSE-Addon-NonOss version 13.2) does
not have the path attribute and can not obtain or set the instance variable it
calls the method in the line reported
(https://github.com/yast/yast-yast2/blob/master/library/packages/src/lib/y2packager/resolvable.rb#L123)
by the super call.

And yep, with the proper fix we will also provide a test covering this case.


You are receiving this mail because: