Bug 1192803

Summary: None or wrong base product has been defined (15.3-1 vs. 15.3-2)
Product: [openSUSE] openSUSE Distribution Reporter: Schott <s.schott>
Component: AutoYaSTAssignee: YaST Team <yast-internal>
Status: CONFIRMED --- QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P2 - High CC: igonzalezsosa, lubos.kocman
Version: Leap 15.3   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Leap 15.3   
URL: https://trello.com/c/39iX2Enc
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2logs autoyast duplicate product

Description Schott 2021-11-17 23:06:57 UTC
Created attachment 853818 [details]
y2logs autoyast duplicate product

As mentioned in https://github.com/yast/yast-autoinstallation/issues/807 , the autoinstallation through Uyuni/AutoYast fails due to a duplicate product definition for "Leap". As suggested by Imo, I used the save_y2logs (which, by the way, you could add a hint about its existence in the autoyast guide :grimacing:), and indeed identified that openSUSE 15.3-1 and 15.3-2 are found, causing the issue (see attachment). Not sure though if this is a metadata problem, or I am missing something on my side. Any help is welcome :D.
Comment 1 Imobach Gonzalez Sosa 2021-11-18 16:49:19 UTC
As a workaround, I guess you could specify the product you want to install in the profile (I do not know whether you are specifying the profile):

  <software>
    <products config:type="list">
      <product>Leap</product>
    </products>
  </software>

I see that there are at least two 15.3 repositories and I wonder whether they can contain different versions. We will dig a little bit more into the problem.
Comment 2 Schott 2021-11-18 21:09:12 UTC
(In reply to Imobach Gonzalez Sosa from comment #1)
> As a workaround, I guess you could specify the product you want to install
> in the profile (I do not know whether you are specifying the profile):
> 
>   <software>
>     <products config:type="list">
>       <product>Leap</product>
>     </products>
>   </software>

Yes, I am using a template made by OpenSUSE itself, where the "Leap" product is defined explictly.

 
> I see that there are at least two 15.3 repositories and I wonder whether
> they can contain different versions. We will dig a little bit more into the
> problem.


At least according to this, I think that is exactly what is happening (y2log):
2021-11-17 17:43:11 <1> ibg4305(3983) [Ruby] y2packager/product_reader.rb(available_base_products):131 all products [#<Y2Packager::Product:0x000055e53f7d1ae8 @name="Leap-Addon-NonOss", @short_name="non oss addon", @display_name="openSUSE Leap 15.3 NonOSS Addon", @version="15.3-0", @arch=:x86_64, @category=:addon, @vendor="openSUSE", @order=nil, @installation_package=nil>, #<Y2Packager::Product:0x000055e533eb8e08 @name="Leap", @short_name="openSUSE Leap", @display_name="openSUSE Leap 15.3", @version="15.3-1", @arch=:x86_64, @category=:addon, @vendor="openSUSE", @order=nil, @installation_package="openSUSE-release">, #<Y2Packager::Product:0x000055e5330712c8 @name="Leap", @short_name="openSUSE Leap", @display_name="openSUSE Leap 15.3", @version="15.3-2", @arch=:x86_64, @category=:addon, @vendor="openSUSE", @order=nil, @installation_package="openSUSE-release">]
Comment 3 Stefan Hundhammer 2021-11-24 11:02:51 UTC
So there is a workaround for this at least; that's good.
Comment 4 Schott 2021-11-24 11:08:13 UTC
(In reply to Stefan Hundhammer from comment #3)
> So there is a workaround for this at least; that's good.

Oh, sorry if it was unclear. I meant, yes, it is defined explicitly, and it still fails, because the name Leap fits for both 15.3-2 and 15.3-1. So it isn't working for me at the moment.
Comment 5 Schott 2021-11-25 09:01:56 UTC
I narrowed it down to the official Update repositories. If I remove the sync with them within the Uyuni channel, it works. From this, I wonder the following things (which might not necessarily directly relate to the (Auto)Yast2 module):

-How necessary is to generate subsub versions of Leap, that cause this kind of errors. 

-Is it possible to implement an alternative to the error message, and maybe enable a selection of the user in case of multiple available Base Channels?

-Within the XML file and the products subsection, would it be possible to add a version entry for the selection procedure? If I could have selected explicitly 15.3-2 from the beginning, it might have worked (or it might have broken things down further down the line, given that apparently there are repos that still don't make the change)
Comment 6 Ladislav Slezák 2021-11-25 11:01:13 UTC
YaST expects either a single product or multiple *different* products. Having the same product twice (or multiple times) is an unexpected situation.

The fix could be to remove the duplicates, but it might be a bit tricky as this expectation might be assumed at several places in the code...
Comment 7 Schott 2021-11-25 11:14:30 UTC
(In reply to Ladislav Slezák from comment #6)
> YaST expects either a single product or multiple *different* products.
> Having the same product twice (or multiple times) is an unexpected situation.
> 
> The fix could be to remove the duplicates, but it might be a bit tricky as
> this expectation might be assumed at several places in the code...

It isn't really the same product, as they have different subsub versions (@version="15.3-1" and @version="15.3-2"). I guess it will be changed at some point at the repo level, but my impression is this event should be handled by the installer as well.
Comment 8 Lubos Kocman 2021-11-25 12:33:19 UTC
*** Bug 1193082 has been marked as a duplicate of this bug. ***
Comment 9 Lubos Kocman 2021-11-25 12:34:35 UTC
Don't forget that we now use 15.3-2 for e.g. QU1 etc. So it gets even more complicated.

Thank you
Comment 10 Stefan Hundhammer 2021-11-30 12:45:21 UTC
Moving to our Scrum task queue.