Bug 1132622

Summary: duplicate repos from online repo module
Product: [openSUSE] openSUSE Distribution Reporter: Ludwig Nussel <lnussel>
Component: YaST2Assignee: Stefan Schubert <schubi>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P1 - Urgent CC: fvogt, schubi
Version: Leap 15.1Flags: lnussel: SHIP_STOPPER-
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://trello.com/c/bsTalwl1/3049-bug-1132622-duplicate-repos-from-online-repo-module
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: yelogs
adding online repo

Description Ludwig Nussel 2019-04-16 09:00:45 UTC
Created attachment 803006 [details]
yelogs

the online repo module still adds duplicate repos, even when the name is the same. Ie it adds eg repo-non-oss_1.repo even though repo-non-oss.repo already existed

# diff -u repo-non-oss_1.repo repo-non-oss.repo 
--- repo-non-oss_1.repo 2019-04-16 10:54:36.284208094 +0200
+++ repo-non-oss.repo   2019-04-16 10:54:36.272207832 +0200
@@ -1,4 +1,4 @@
-[repo-non-oss_1]
+[repo-non-oss]
 name=Non-OSS Repository
 enabled=1
 autorefresh=1


Wrt logs note that there was a mistake in the server side xml for repo-oss (no alias) so check for repo-non-oss in the logs.
Comment 1 Ludwig Nussel 2019-04-17 07:57:03 UTC
With this prominent popup in the installer people are more likely to end up with duplicate repos. Raising prio, maybe should be even P1.
Comment 2 Stefan Schubert 2019-04-18 14:26:11 UTC
Created attachment 803217 [details]
adding online repo

We should really check if the repo has already been added.
Comment 3 Lukas Ocilka 2019-04-22 20:47:32 UTC
Well, we actually already do so, but maybe there's yet another difference in
URLs or something else. We'll try to fix it.
Comment 4 Stefan Schubert 2019-05-03 07:09:24 UTC
*** Bug 1133944 has been marked as a duplicate of this bug. ***
Comment 5 Ludwig Nussel 2019-05-03 12:07:52 UTC
According to the duplicate it affects the live installer so raising prio
Comment 6 Lukas Ocilka 2019-05-03 12:20:03 UTC
Planned, but not dne yet
Comment 7 Stefan Schubert 2019-05-14 14:34:29 UTC
Fixed in:
https://github.com/yast/yast-packager/pull/436
Submitted to SUSE:SLE-15-SP1:GA : id 192547
Comment 9 Fabian Vogt 2019-05-14 15:08:56 UTC
(In reply to Ludwig Nussel from comment #5)
> According to the duplicate it affects the live installer so raising prio

(In reply to Stefan Schubert from comment #7)
> Fixed in:
> https://github.com/yast/yast-packager/pull/436
> Submitted to SUSE:SLE-15-SP1:GA : id 192547

I tried the yast2-packager built with this sr (changelog entry is part of the installed package) and it still fails the same way in a live installation.

I can upload the YaST2 logs again, but they appear to be identical to the ones I uploaded in bug 1133944.
Comment 10 Stefan Schubert 2019-05-15 08:25:46 UTC
Fabian has shown me. Thanks ! I think it is a special case for Live-CD. Will have to test it again.....
Comment 11 Ludwig Nussel 2019-05-15 09:02:16 UTC
the amount of iterations we needed so far makes this look risky for GM to me. will have to go to maintenance.
Comment 12 Stefan Schubert 2019-05-21 07:42:47 UTC
The main problem is here that an installation workflow will be started within a Live-CD environment. That means that YAST knows only one source repository from which it has been booted from:
http://download.opensuse.org/distribution/leap/15.1/repo/oss.The installation destination has been set to /mnt.
In that case YAST does not know anything about the the rest e.g. update repositories. 
I have made different tries to get the repositories, installation destinations and libzypp stacks in sync but the result has been everytime a huge hack with the risk to break other stuff for an installation in a "normal" environment.
The last try will be to check the error if a repository has already been added to inst-sys and ignore the error.
The other possibility would be to remove all update repositories before starting the installation workflow with the only one remaining http://download.opensuse.org/distribution/leap/15.1/repo/oss repo.
Comment 13 Fabian Vogt 2019-05-21 07:45:02 UTC
(In reply to Stefan Schubert from comment #12)
> The main problem is here that an installation workflow will be started
> within a Live-CD environment. That means that YAST knows only one source
> repository from which it has been booted from:
> http://download.opensuse.org/distribution/leap/15.1/repo/oss.The
> installation destination has been set to /mnt.
> In that case YAST does not know anything about the the rest e.g. update
> repositories. 
> I have made different tries to get the repositories, installation
> destinations and libzypp stacks in sync but the result has been everytime a
> huge hack with the risk to break other stuff for an installation in a
> "normal" environment.
> The last try will be to check the error if a repository has already been
> added to inst-sys and ignore the error.

The part I do not understand is that while YaST apparently tries to add the repos to the inst-sys (= live environment in this case), it never actually adds them. It just shows an error message if a repo is already there.

> The other possibility would be to remove all update repositories before
> starting the installation workflow with the only one remaining
> http://download.opensuse.org/distribution/leap/15.1/repo/oss repo.
Comment 14 Stefan Schubert 2019-05-21 14:22:40 UTC
We overwrite already added repos now:
https://github.com/yast/yast-packager/pull/439
SR :id 193104
Comment 16 Swamp Workflow Management 2019-05-22 08:00:07 UTC
This is an autogenerated message for OBS integration:
This bug (1132622) was mentioned in
https://build.opensuse.org/request/show/704639 15.1:Images / yast2-packager
Comment 22 Swamp Workflow Management 2019-07-26 22:16:45 UTC
SUSE-RU-2019:1992-1: An update that has 5 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1114018,1132622,1135901,1136325,1136708
CVE References: 
Sources used:
SUSE Linux Enterprise Module for Basesystem 15-SP1 (src):    yast2-add-on-4.1.13-3.7.1, yast2-packager-4.1.47-3.9.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 23 Swamp Workflow Management 2019-08-08 19:13:21 UTC
openSUSE-RU-2019:1838-1: An update that has 5 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1114018,1132622,1135901,1136325,1136708
CVE References: 
Sources used:
openSUSE Leap 15.1 (src):    yast2-add-on-4.1.13-lp151.2.10.1, yast2-packager-4.1.47-lp151.2.3.1