|
Bugzilla – Full Text Bug Listing |
| Summary: | YaST Software Repositories adds new repo URL as service | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Tumbleweed | Reporter: | Frank Krüger <fkrueger> |
| Component: | YaST2 | Assignee: | Ladislav Slezák <lslezak> |
| Status: | RESOLVED FIXED | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Normal | ||
| Priority: | P2 - High | CC: | fkrueger, jpupava, jreidinger, lslezak, mendres82, opensuse, zypp-maintainers |
| Version: | Current | ||
| Target Milestone: | --- | ||
| Hardware: | x86-64 | ||
| OS: | Other | ||
| URL: | https://trello.com/c/0IfDlkF5 | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
yast2 adding repo
bsc#1218399_add_repo_url_steps_1-4 y2logs y2log add repo url Screenshot: Adding a repo as URL Screenshot: After adding, the repo shows up as service y2log from one "yast2 repositories" run (with Y2DEBUG=1 ZYPP_FULLLOG=1) Add Repo URL |
||
|
Description
Frank Krüger
2023-12-26 09:48:07 UTC
I had the same issue - with yast trying to add a new repo request as a service - after completing a fresh install using the 22122023 snapshot. As a sort term solution I reinstalled the previous version of libzypp (1.1.x86_64.rpm) - which is still in the Main OSS repo - and locked this. Lada - my wild guess is that it is caused by your latest change that fix saving services at https://github.com/yast/yast-packager/blob/master/package/yast2-packager.changes#L4 I'm unable to reproduce the problem using openSUSE-Tumbleweed-DVD-x86_64-Snapshot20240103-Media.iso. I was able to add these repositories without any problem: https://download.opensuse.org/repositories/YaST:/Head/openSUSE_Tumbleweed/ https://download.opensuse.org/history/20231208/tumbleweed/repo/oss/ Please try it again in the latest TW snapshot. If you can still reproduce the problem then describe the exact steps what did you do. And also attach the YaST logs (https://en.opensuse.org/openSUSE:Report_a_YaST_bug). (In reply to Ladislav Slezák from comment #3) > I'm unable to reproduce the problem using > openSUSE-Tumbleweed-DVD-x86_64-Snapshot20240103-Media.iso. BTW that version still contains yast2-packager-5.0.1-1.1.x86_64... Thanks for posting. A bit strange! I have this issue as per post 1. I am now using a (further) fresh install of tumbleweed based on the snapshot of the 23122023 updated daily since. I had the same issue, on install, of being unable to add repos by using yast. As before, I installed the previous version of libzypp (version 17.31.25-1.1.x86_64.rpm), then locked this and this workaround worked fine. As you suggested, I have just updated libzypp to the latest version (17.31.27-1.1.x86_64.rpm) and again am unable to add repos to yeast using zast. As a test, I removed packman and tried to add this back. Again yast tried to add this as a a 'service' rather than as a 'repo'. I will submit my Yast2 logs Created attachment 871704 [details]
yast2 adding repo
Created attachment 871707 [details]
bsc#1218399_add_repo_url_steps_1-4
I am still observing this issue with current TW20240107. Please find attached the steps to add the repos's url, which shows up as service instead.
(In reply to garry fielding from comment #6) > Created attachment 871704 [details] > yast2 adding repo Unfortunately, your attachment exists only as link (i.e. /home/garry/zypper.tar.gz). Frank and Josef - do you still have this issue of yast not being able to add repos? I do. I see that yesterday's snapshot (11012024) has a new version of 'libzypp' (17.31.38-1.1.x86_64.rpm) but this has not changed the behaviour. I have tried installing a number of different snapshots but no difference. I can't understand why we are affected but other users do not appear to have this problem! (In reply to garry fielding from comment #9) > Frank and Josef - do you still have this issue of yast not being able to add > repos? > > I do. > > I see that yesterday's snapshot (11012024) has a new version of 'libzypp' > (17.31.38-1.1.x86_64.rpm) but this has not changed the behaviour. I have > tried installing a number of different snapshots but no difference. > > I can't understand why we are affected but other users do not appear to have > this problem! Issue still exists with TW20240111. I am sure other users are also affected, but don't notice. "Issue still exists with TW20240111. I am sure other users are also affected, but don't notice" That is a good point, as I suppose if you just use 'zypper dup' or 'zypper up' to an existing system you are not adding any repos to your system (and do not come across the problem). Created attachment 871857 [details]
y2logs
- Open YaST software
- Repositories
- Add repo via URL
Result: The repo does not show up as repo but as service
Reproducable here on several machines with openSUSE Tumbleweed 20240111
(In reply to garry fielding from comment #9) > Frank and Josef - do you still have this issue of yast not being able to add > repos? > > I do. > > I see that yesterday's snapshot (11012024) has a new version of 'libzypp' > (17.31.38-1.1.x86_64.rpm) but this has not changed the behaviour. I have > tried installing a number of different snapshots but no difference. > > I can't understand why we are affected but other users do not appear to have > this problem! I can confirm this problem as well. However, until now I thought it was a problem on my side, since I need to get into YAST again after some abstinence from openSUSE. Adding a repository using the zypper ar command worked though. Created attachment 871859 [details] y2log add repo url (In reply to Ladislav Slezák from comment #3) > I'm unable to reproduce the problem using > openSUSE-Tumbleweed-DVD-x86_64-Snapshot20240103-Media.iso. > > I was able to add these repositories without any problem: > https://download.opensuse.org/repositories/YaST:/Head/openSUSE_Tumbleweed/ > https://download.opensuse.org/history/20231208/tumbleweed/repo/oss/ > > Please try it again in the latest TW snapshot. If you can still reproduce > the problem then describe the exact steps what did you do. And also attach > the YaST logs (https://en.opensuse.org/openSUSE:Report_a_YaST_bug). Is there any news from your side? Anyway, I have attached - in addition to the logs provided in comment #12 - the logs when the YaST:Head repo (as an example) is added erroneously as service. Since I have no experience with "bisecting" of YaST packages, could someone from the YaST team please provide yast2-packager with the revert of commit https://github.com/yast/yast-packager/pull/642? Thx. Moving to our Trello task queue. Frank, if you would really like to try that, it's as simple as applying the reverse diff (i.e. 'diff -r') of that one file 'repositories.rb' and copying it again to its location below /usr/share/YaST2, in this case /usr/share/YaST2/lib/packager/clients/repositories.rb Since it's interpreted Ruby, no further steps are necessary in this case. I can confirm that it's easy to reproduce, both on the latest TW and on Leap 15.5 + YaST:Head. I used https://download.opensuse.org/repositories/home:/shundhammer:/qdirstat-stable/openSUSE_Tumbleweed/ on TW and https://download.opensuse.org/repositories/home:/shundhammer:/qdirstat-stable/15.5/ on Leap 15.5. It happens every time when I use "yast2 repositories" (as root, of course), then "Add" -> "Specify URL..." or "https:". I went back with yast2-packager from the master branch to the SLE-15-SP5 branch and even to the SLE-15-SP4 branch; no change. What my TW and my Leap 15.5 + YaST:Head have in common are very similar libzypp versions: TW: libzypp-17.31.28-1.1.x86_64 Leap: libzypp-17.31.27-150400.3.49.1.x86_64 Adding the same repo with "zypper ar" works normally; I don't see a service in "yast2 repositories" afterwards. Created attachment 871951 [details]
Screenshot: Adding a repo as URL
Created attachment 871952 [details]
Screenshot: After adding, the repo shows up as service
From the ZYPP POV it's just important whether YAST calls RepoManager::addRepository or RepoManager::addService. So the yast.log would tell more than the Screenshot does. If you created the right kind thing, you should be able to figure out what YAST refers to in order to classify it as a Service. If you compare `zypper lr` and `zypper ls` you find that standalone Repos are also listed in `ls`. They are seen as a trivial service providing just the one repo. Created attachment 871979 [details]
y2log from one "yast2 repositories" run (with Y2DEBUG=1 ZYPP_FULLLOG=1)
> 2024-01-18 13:19:12 <1> balrog(9062) [Ruby]
> packager/repositories_include.rb(add_service):484
> Added new service:
> {
> "alias"=>"service", "autorefresh"=>true,
> "enabled"=>true, "raw_name"=>"HuHa-02",
> "url"=>"https://download.opensuse.org/repositories/home:/shundhammer:/qdirstat-stable/15.5/"
> }
I found the problem, when adding a repository YaST runs probing to test whether the entered URL points to a service or to a repository: [Pkg] ServiceManager.cc(Probe):304 Detected service type: N/A If the probing result is not "NONE" YaST thinks the URL points to a service: if !service_type.nil? && service_type != "NONE" (https://github.com/yast/yast-packager/blob/6b52df96c60a33449d915f741c3df3f497012738/src/lib/packager/clients/repositories.rb#L2036) The problem is that libzypp recently changed the "NONE" string to "N/A". I'll fix it on the pkg-bindings side, I already did another fix related to this libzypp change (https://github.com/yast/yast-pkg-bindings/pull/183/files#diff-b34819e5e9a292462cddc1725ba58267c30fdbf92a0aaf718c9d25ba478b80e8R123). (In reply to Ladislav Slezák from comment #25) > > The problem is that libzypp recently changed the "NONE" string to "N/A". > The libzypp RepoType is an enum. There are indeed several string representations valid for each enum type (and in fact more than your conversion table knows about). If you want/need to refer to fix strings rather than the enum values, you could let libzypp convert your string into the enum value. The you don't need to know all the stings zypp knows. std::string PkgFunctions::zypp2yastType(const std::string &type) { try { zypp::RepoType zypptype { type }; switch ( zypptype.toEnum() ) { case zypp::RepoType::NONE_e: return "NONE"; case zypp::RepoType::RPMMD_e: return "rpm-md"; case zypp::RepoType::YAST2_e: return "yast2"; case zypp::RepoType::RPMPLAINDIR_e: return "plaindir"; } // Here: Zypp introduced a new enum value // gcc should have warned about the unhandled enum in switch return "YastWordForSomeTypeYastDoesNotKnowYet"; } catch ( const RepoUnknownTypeException & ex ) { ...type string is unknown to zypp return "YastWordForSomethingZyppDoesNotRecognizeAsType"; } } And the libzypp ServiceType is an enum too. Thanks for the hint! Using enums is much better and I can enable treating warnings as errors. Then the package build fails if libzypp adds something new. *** Bug 1218859 has been marked as a duplicate of this bug. *** Fixed in yast2-pkg-bindings-5.0.4 (https://github.com/yast/yast-pkg-bindings/pull/184, https://build.opensuse.org/request/show/1139878) Tested the fix on my system and it works fine. *** Bug 1218770 has been marked as a duplicate of this bug. *** SUSE-RU-2024:0222-1: An update that has two fixes can now be installed. Category: recommended (moderate) Bug References: 1218399, 1218977 Sources used: SUSE Linux Enterprise Server 15 SP2 (src): yast2-pkg-bindings-4.2.17-150200.3.22.1 SUSE Linux Enterprise High Performance Computing 15 SP2 LTSS 15-SP2 (src): yast2-pkg-bindings-4.2.17-150200.3.22.1 SUSE Linux Enterprise Server 15 SP2 LTSS 15-SP2 (src): yast2-pkg-bindings-4.2.17-150200.3.22.1 SUSE Linux Enterprise Server for SAP Applications 15 SP2 (src): yast2-pkg-bindings-4.2.17-150200.3.22.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. SUSE-RU-2024:0221-1: An update that has two fixes can now be installed. Category: recommended (moderate) Bug References: 1218399, 1218977 Sources used: openSUSE Leap 15.3 (src): yast2-pkg-bindings-devel-doc-4.3.13-150300.3.6.1, yast2-pkg-bindings-4.3.13-150300.3.6.1 SUSE Linux Enterprise Server 15 SP3 (src): yast2-pkg-bindings-4.3.13-150300.3.6.1 SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): yast2-pkg-bindings-4.3.13-150300.3.6.1 SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): yast2-pkg-bindings-4.3.13-150300.3.6.1 SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): yast2-pkg-bindings-4.3.13-150300.3.6.1 SUSE Enterprise Storage 7.1 (src): yast2-pkg-bindings-4.3.13-150300.3.6.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. SUSE-RU-2024:0220-1: An update that has two fixes can now be installed. Category: recommended (moderate) Bug References: 1218399, 1218977 Sources used: openSUSE Leap 15.5 (src): yast2-pkg-bindings-devel-doc-4.5.3-150500.3.3.1, yast2-pkg-bindings-4.5.3-150500.3.3.1 SUSE Linux Enterprise High Performance Computing 15 SP5 (src): yast2-pkg-bindings-4.5.3-150500.3.3.1 SUSE Linux Enterprise Server 15 SP5 (src): yast2-pkg-bindings-4.5.3-150500.3.3.1 SUSE Linux Enterprise Server for SAP Applications 15 SP5 (src): yast2-pkg-bindings-4.5.3-150500.3.3.1 SUSE Linux Enterprise Desktop 15 SP5 (src): yast2-pkg-bindings-4.5.3-150500.3.3.1 Basesystem Module 15-SP5 (src): yast2-pkg-bindings-4.5.3-150500.3.3.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. SUSE-RU-2024:0235-1: An update that has two fixes can now be installed. Category: recommended (moderate) Bug References: 1218399, 1218977 Sources used: openSUSE Leap 15.4 (src): yast2-pkg-bindings-devel-doc-4.4.7-150400.3.9.1, yast2-pkg-bindings-4.4.7-150400.3.9.1 SUSE Linux Enterprise High Performance Computing 15 SP4 (src): yast2-pkg-bindings-4.4.7-150400.3.9.1 SUSE Linux Enterprise Server 15 SP4 (src): yast2-pkg-bindings-4.4.7-150400.3.9.1 SUSE Manager Server 4.3 (src): yast2-pkg-bindings-4.4.7-150400.3.9.1 SUSE Linux Enterprise Server for SAP Applications 15 SP4 (src): yast2-pkg-bindings-4.4.7-150400.3.9.1 SUSE Linux Enterprise Desktop 15 SP4 (src): yast2-pkg-bindings-4.4.7-150400.3.9.1 SUSE Manager Retail Branch Server 4.3 (src): yast2-pkg-bindings-4.4.7-150400.3.9.1 SUSE Manager Proxy 4.3 (src): yast2-pkg-bindings-4.4.7-150400.3.9.1 SUSE Linux Enterprise High Performance Computing ESPOS 15 SP4 (src): yast2-pkg-bindings-4.4.7-150400.3.9.1 SUSE Linux Enterprise High Performance Computing LTSS 15 SP4 (src): yast2-pkg-bindings-4.4.7-150400.3.9.1 SUSE Linux Enterprise Desktop 15 SP4 LTSS 15-SP4 (src): yast2-pkg-bindings-4.4.7-150400.3.9.1 SUSE Linux Enterprise Server 15 SP4 LTSS 15-SP4 (src): yast2-pkg-bindings-4.4.7-150400.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. Created attachment 874112 [details]
Add Repo URL
Groundhog Day! Given TW20240404 with libzypp-17.32.2-1.1.x86_64 and yast2-packager-5.0.5-1.1.x86_64, adding a new repo with its URL via YaST saves it as service not as repo. Using "zypper ar" from the commandline works just fine. The issue is back. (In reply to Frank Krüger from comment #43) > Groundhog Day! Given TW20240404 with libzypp-17.32.2-1.1.x86_64 and > yast2-packager-5.0.5-1.1.x86_64, adding a new repo with its URL via YaST > saves it as service not as repo. Using "zypper ar" from the commandline > works just fine. Works again, sorry for the noise. |