Bug 1191351 - Fix missing methods for software installation process
Fix missing methods for software installation process
Status: CONFIRMED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2
Current
x86-64 openSUSE Tumbleweed
: P5 - None : Major (vote)
: ---
Assigned To: YaST Team
Jiri Srain
https://trello.com/c/NnO0AyZm
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-10-05 20:40 UTC by Markus Elfring
Modified: 2021-10-08 17:03 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
error logs as background information for another questionable software upgrade attempt (3.69 MB, application/x-xz-compressed-tar)
2021-10-05 20:40 UTC, Markus Elfring
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Elfring 2021-10-05 20:40:56 UTC
Created attachment 852945 [details]
error logs as background information for another questionable software upgrade attempt

I tried it out by the means of the image “openSUSE-Tumbleweed-DVD-x86_64-Snapshot20210928-Media.iso” to upgrade another system which became affected also by installation challenges with link changes according to an evolving topic.
https://en.opensuse.org/openSUSE:Usr_merge#State_in_openSUSE

It seemed that the dependency resolution succeeded after a while.
Unfortunately, a missing method was reported after the start of the software update.
(I did not notice any interfaces which would trigger more helpful clarification possibilities.)

I dared another software update attempt by the means of the image “openSUSE-Tumbleweed-KDE-Live-x86_64-Snapshot20210929-Media.iso”.
Hours were needed to configure the involved dependencies until I found them good enough for the next system upgrade.

But I got annoyed once more after the update start by the following error message.

“
Internal error. Please report a bug report with logs.
Run save_y2logs to get complete logs.

Caller: /usr/share/YaST2/lib/y2packager/resolvable.rb:123:in `method_missing'

Details: undefined method `path' for #<Y2Packager::Resolvable:0x000055a9b6c25d98>

Start the Ruby debugger now and debug the issue? (Experts only!)
”


How will the chances evolve to fix remaining open issues?
Comment 1 Knut Alejandro Anderssen González 2021-10-07 14:10:31 UTC
Could you run the upgrade with the Y2DEBUG=1 option? we will need more debugging
Comment 2 Markus Elfring 2021-10-07 14:58:13 UTC
(In reply to Knut Alejandro Anderssen González from comment #1)
> Could you run the upgrade with the Y2DEBUG=1 option?

Theoretically, yes.

Practically, I am not really motivated to invest hours immediately for the reproduction of some questionable software behaviours again.
My mood might change under special circumstances.


> we will need more debugging

I find such a feedback partly interesting.

I hope that more efficient solution approaches will be found somehow (also because of log data which I attached for bug reports already).
Comment 3 Markus Elfring 2021-10-07 18:26:08 UTC
Will the chances grow for corresponding software fixes also by the means of more detailed source code analysis and review?
https://github.com/yast/yast-yast2/blob/4f0560a55f0b4ece41ed50063fd7baf00cd8eedc/library/packages/src/lib/y2packager/resolvable.rb#L105
Comment 4 Markus Elfring 2021-10-07 19:10:27 UTC
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”)?
Comment 5 Knut Alejandro Anderssen González 2021-10-08 11:09:11 UTC
(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”)?

Ok, I was trying to reproduce the error and was able to raise the same exception in a console:

So apparently the problem is cause by products which do not have the "path" attribute which should be optional:

From the logs at least these two:

<Y2Packager::Resolvable:0x000055a9b222ccf0 @arch="i586", @kind=:product, @name="openSUSE-Addon-NonOss", @source=57, @         +version="13.2-0">,␣    #<Y2Packager::Resolvable:0x000055a9b222cc00 @arch="x86_64", @kind=:product, @name="openSUSE-Addon-NonOss", @source=57, @version="13.2-0">
Comment 6 Markus Elfring 2021-10-08 12:05:42 UTC
(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?
Comment 7 Knut Alejandro Anderssen González 2021-10-08 12:51:40 UTC
(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.
Comment 8 Knut Alejandro Anderssen González 2021-10-08 12:52:12 UTC
I have created a PBI in order to plan for it during next sprints.

Thanks for the bug report.
Comment 9 Markus Elfring 2021-10-08 17:03:40 UTC
(In reply to Knut Alejandro Anderssen González from comment #8)
How will chances evolve to optimise the dependency resolution any further for the involved components (also for my next software distribution upgrade attempts)?