http://bugzilla.opensuse.org/show_bug.cgi?id=1189024
Bug ID: 1189024 Summary: Sway: potential name conflict pattern vs package Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: All OS: openSUSE Tumbleweed Status: NEW Severity: Normal Priority: P5 - None Component: Patterns Assignee: dimstar@opensuse.org Reporter: tammo.oepkes@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: ---
Created attachment 851501 --> http://bugzilla.opensuse.org/attachment.cgi?id=851501&action=edit Screenshot from sway install on minimal system
There are a package and a pattern which are both called `sway`. If one attempts to install the sway package, the pattern unintentionally gets installed.
Reproduce: - install Tumbleweed, choose server install (to get minimal system) - modify `/etc/zypp/zypp.conf`: `solver.onlyRequires = true` - modify `/etc/zypp/zypper.conf`: `installRecommends = no` - run dist-upgrade - run `zypper install sway`
This will attempt to install the sway _pattern_ (with 196 packages, consuming 343 MiB).
For comparison, an i3 installation attempt on the same (minimal) system attempts to install 23 packages, weighing only 6.9 MiB.
I tried to install sway package (instead of pattern) explicitly with `zypper install --type package sway`, but this yields the same result as omitting the switch.
My assumption is that the identical names for pattern and package cause unintended behavior.
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024
Tammo Oepkes tammo.oepkes@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |tammo.oepkes@suse.com
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024 http://bugzilla.opensuse.org/show_bug.cgi?id=1189024#c1
Dominique Leuenberger dimstar@opensuse.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|Patterns |libzypp Assignee|dimstar@opensuse.org |zypp-maintainers@suse.de
--- Comment #1 from Dominique Leuenberger dimstar@opensuse.org --- (In reply to Tammo Oepkes from comment #0)
Reproduce:
- install Tumbleweed, choose server install (to get minimal system)
- modify `/etc/zypp/zypp.conf`: `solver.onlyRequires = true`
- modify `/etc/zypp/zypper.conf`: `installRecommends = no`
- run dist-upgrade
- run `zypper install sway`
This will attempt to install the sway _pattern_ (with 196 packages, consuming 343 MiB).
For comparison, an i3 installation attempt on the same (minimal) system attempts to install 23 packages, weighing only 6.9 MiB.
I tried to install sway package (instead of pattern) explicitly with `zypper install --type package sway`, but this yields the same result as omitting the switch.
That rather sounds like a zypper/libzypp bug not being able to handle the same names.
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024 http://bugzilla.opensuse.org/show_bug.cgi?id=1189024#c2
--- Comment #2 from Tammo Oepkes tammo.oepkes@suse.com --- (In reply to Dominique Leuenberger from comment #1)
That rather sounds like a zypper/libzypp bug not being able to handle the same names.
Later yesterday evening I compared the sway package/pattern behavior to similar patterns/packages (like kde, gnome, mint, cinnamon, lxde, lxqt).
Out of these, the only package/pattern combination with identical names for package/pattern was cinnamon. But installing cinnamon package shows a different package selection than installing the cinnamon pattern.
My original assumed cause (name conflict) seems to be wrong then. So it would be something specific to the sway package that causes the sway _pattern_ to be pulled as a dependency.
---
toe@toe-tp-20uj ~ % sudo zypper install --type pattern cinnamon (...) The following 141 NEW packages are going to be installed: (...)
The following 4 NEW patterns are going to be installed: basesystem cinnamon cinnamon_basis x11
141 new packages to install. Overall download size: 59,0 MiB. Already cached: 0 B. After the operation, additional 171,8 MiB will be used. Continue? [y/n/v/...? shows all options] (y):
---
toe@toe-tp-20uj ~ % sudo zypper install cinnamon (...) The following 99 NEW packages are going to be installed: (...)
99 new packages to install. Overall download size: 29,1 MiB. Already cached: 0 B. After the operation, additional 70,5 MiB will be used. Continue? [y/n/v/...? shows all options] (y):
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024 http://bugzilla.opensuse.org/show_bug.cgi?id=1189024#c3
--- Comment #3 from Michael Andres ma@suse.com --- @Tammo, we'd need to see the /var/log/zypper.log that shows the `zypper install sway` command.
[if you have the zypper-log package installed, you can use 'zypper log' to list the commands included in a log file (or in rotated logs)]
From the screen output you can not judge, whether pattern:sway (the patterns-sway-sway package) was selected as primary solver job or in the dependency tree of the sway package.
You can: grep 'main.cc|job:.*sway' /var/log/zypper.log to see the sway related solver jobs.
Having actually selected the pattern in presence of a package would be a bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024
Michael Andres ma@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(tammo.oepkes@suse | |.com)
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024 http://bugzilla.opensuse.org/show_bug.cgi?id=1189024#c4
--- Comment #4 from Tammo Oepkes tammo.oepkes@suse.com --- Created attachment 851512 --> http://bugzilla.opensuse.org/attachment.cgi?id=851512&action=edit Screenshot of zypper.log grep
The zypper.log shows that the installed package is sway-1.6.1-1.1.x86_64
It seems that my initial assumption (name conflict) was wrong and that something in the sway package's dependencies causes the sway _pattern_ to get selected for installation.
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024
Tammo Oepkes tammo.oepkes@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|libzypp |Other Assignee|zypp-maintainers@suse.de |screening-team-bugs@suse.de Summary|Sway: potential name |Sway: sway package pulls |conflict pattern vs package |sway pattern as dependency
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024 http://bugzilla.opensuse.org/show_bug.cgi?id=1189024#c5
--- Comment #5 from Michael Andres ma@suse.com --- You can try to re-try it. On my TW sway does not install pattern:sway.
zypper remove --clean-deps sway pattern:sway zypper install --dry-run sway
If it still selects pattern:sway, run
zypper install --debug-solver sway
This will not install the sway package, but create a solver testcase. The directory containing the testcase (zypper tells the path) needs to be packed and attached here.
This should reveal why pattern:sway was selected.
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024 http://bugzilla.opensuse.org/show_bug.cgi?id=1189024#c6
--- Comment #6 from Tammo Oepkes tammo.oepkes@suse.com --- Created attachment 851552 --> http://bugzilla.opensuse.org/attachment.cgi?id=851552&action=edit zypper solver test case
Attached the solver test case.
Line 179 of solver.result has install pattern:sway and line 180 has patterns-sway-sway, but it has no install reason.
Package sway-branding-openSUSE has patterns-sway-sway under requires, while package sway-branding-upstream doesn't.
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024 http://bugzilla.opensuse.org/show_bug.cgi?id=1189024#c7
--- Comment #7 from Tammo Oepkes tammo.oepkes@suse.com --- (In reply to Tammo Oepkes from comment #6)
Package sway-branding-openSUSE has patterns-sway-sway under requires, while package sway-branding-upstream doesn't.
This makes me wonder what strategy zypper uses to resolve alternative dependencies. The sway package itself has `sway-branding` as requirement (without specifying -openSUSE or -upstream).
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024 http://bugzilla.opensuse.org/show_bug.cgi?id=1189024#c8
Michael Andres ma@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(tammo.oepkes@suse | |.com) |
--- Comment #8 from Michael Andres ma@suse.com --- In this case: The branding packages supplement the brnading that's installed.
According to the testcase you have branding-openSUSE installed, so the solver chooses sway-branding-openSUSE which supplements (sway and branding-openSUSE).
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024 http://bugzilla.opensuse.org/show_bug.cgi?id=1189024#c9
Michael Andres ma@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID
--- Comment #9 from Michael Andres ma@suse.com --- You could lock (zypper al sway-branding-openSUSE) before installing sway. Then the solver will pick sway-branding-upstream.
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024 http://bugzilla.opensuse.org/show_bug.cgi?id=1189024#c10
Tammo Oepkes tammo.oepkes@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |---
--- Comment #10 from Tammo Oepkes tammo.oepkes@suse.com --- (In reply to Michael Andres from comment #8)
According to the testcase you have branding-openSUSE installed, so the solver chooses sway-branding-openSUSE which supplements (sway and branding-openSUSE).
I hadn't installed anything on the system that relates to graphical interfaces until I installed Sway. Then it picked the branding-openSUSE during Sway install.
Maybe branding-openSUSE was a remnant of the first sway installation run (according to https://bugzilla.opensuse.org/show_bug.cgi?id=1189024#c5) and the subsequent `--clean-deps` did not remove it.
I'll do a new minimal install and provide another test case.
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024 http://bugzilla.opensuse.org/show_bug.cgi?id=1189024#c11
Simon Lees simonf.lees@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |simonf.lees@suse.com
--- Comment #11 from Simon Lees simonf.lees@suse.com --- (In reply to Tammo Oepkes from comment #6)
Package sway-branding-openSUSE has patterns-sway-sway under requires, while package sway-branding-upstream doesn't.
Yeah this is probably slightly backwards, the sway-branding-openSUSE package should require all the things needed to get sway functioning on openSUSE without requiring a pattern, then either the sway package or the pattern should require a branding package in such a way either the openSUSE or Upstream one can be installed.
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024 http://bugzilla.opensuse.org/show_bug.cgi?id=1189024#c12
Denys Kondratenko stdden@opensuse.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stdden@opensuse.org
--- Comment #12 from Denys Kondratenko stdden@opensuse.org --- yeah, something is broken. I can reproduce on TW. Installing Sway should pick up upstream branding and minimal packages by default.
Will debug it and see.
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024 http://bugzilla.opensuse.org/show_bug.cgi?id=1189024#c13
--- Comment #13 from Denys Kondratenko stdden@opensuse.org --- as a workaround you could do `zypper in sway-branding-upstream` that has only 16.4 MB of basic packages.
I would investigate what is going wrong (probably with Supplements in a spec).
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024 http://bugzilla.opensuse.org/show_bug.cgi?id=1189024#c14
--- Comment #14 from Simon Lees simonf.lees@suse.com --- Ahh I forgot to hit save on my previous comment. By default on openSUSE installs you should have a package branding-openSUSE installed, it should cause *-branding-openSUSE packages to be preferred over *-branding-upstream packages. Which at a guess is what is happening here.
There is also a package branding-upstream, which if installed will cause people to prefer upstream branding everywhere (plymouth, lightdm etc as well as desktops). As far as i'm aware nothing else is recommending *-branding-upstream while the branding-openSUSE package is installed.
As a work around you can encourage people to either install branding-upstream or "zypper in sway sway-branding-upstream". But i'm not really sure that installing sway-branding-upstream when branding-openSUSE is installed is the right thing to do I think this is the intended behavior in openSUSE.
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024 http://bugzilla.opensuse.org/show_bug.cgi?id=1189024#c15
--- Comment #15 from Denys Kondratenko stdden@opensuse.org --- Hi Simon,
thanks for the hint.
When I was thinking about openSUSEway (sway DE for openSUSE), I thought: - openSUSEway package and/or pattern - to install branded openSUSE sway DE - patterns-sway-sway to install basic sway with upstream branding - sway should have only sway and branding package installed (with is default sway config)
So I was thinking: sway-branding-upstream should go with default sway installation.
For openSUSE branding - there is special package/pattern.
In the installation media - both patterns are available and could be chosen.
So I think I messed up somewhere in Supplements/branding so sway package somehow chooses openSUSE branding instead upstream one by default.
Thanks, Denys
http://bugzilla.opensuse.org/show_bug.cgi?id=1189024 http://bugzilla.opensuse.org/show_bug.cgi?id=1189024#c16
--- Comment #16 from Simon Lees simonf.lees@suse.com --- (In reply to Denys Kondratenko from comment #15)
Hi Simon,
thanks for the hint.
When I was thinking about openSUSEway (sway DE for openSUSE), I thought:
- openSUSEway package and/or pattern - to install branded openSUSE sway DE
- patterns-sway-sway to install basic sway with upstream branding
- sway should have only sway and branding package installed (with is default
sway config)
So I was thinking: sway-branding-upstream should go with default sway installation.
For openSUSE branding - there is special package/pattern.
In the installation media - both patterns are available and could be chosen.
So I think I messed up somewhere in Supplements/branding so sway package somehow chooses openSUSE branding instead upstream one by default.
Thanks, Denys
I couldn't quite see where the sway-branding-openSUSE comes from, but in sway-branding-upstream you have "Supplements: (%{name} and branding-upstream)", if you wanted it to be the default for all systems you probably also want Supplements: (%{name} and branding-openSUSE)" then no supplements in the sway-branding-openSUSE package otherwise the solver would be back to having a choice.