https://bugzilla.novell.com/show_bug.cgi?id=787382
https://bugzilla.novell.com/show_bug.cgi?id=787382#c0
Summary: 'zypper rm -u' is not thorough enough when dealing with patterns Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: x86-64 OS/Version: openSUSE 12.2 Status: NEW Severity: Normal Priority: P5 - None Component: libzypp AssignedTo: zypp-maintainers@forge.provo.novell.com ReportedBy: yoshi314@gmail.com QAContact: qa-bugs@suse.de Found By: --- Blocker: ---
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0
A simple example to illustate the problem :
------------------------------------------------------------------
a system is installed with no kde4 related patterns.
rpm -qa |grep pattern
patterns-openSUSE-base-12.2-5.5.1.x86_64 patterns-openSUSE-enhanced_base-12.2-5.5.1.x86_64 patterns-openSUSE-fonts-12.2-5.5.1.x86_64 patterns-openSUSE-minimal_base-12.2-5.5.1.x86_64 patterns-openSUSE-sw_management-12.2-5.5.1.x86_64 patterns-openSUSE-yast2_install_wf-12.2-5.5.1.x86_64 patterns-openSUSE-yast2_basis-12.2-5.5.1.x86_64
A command to install kde4 pattern is issued :
~ # zypper in -t pattern kde4
after installation, a command to remove the same pattern is issued :
~ # zypper rm -u patterns-openSUSE-kde4
~ # rpm -qa |grep pattern
patterns-openSUSE-base-12.2-5.5.1.x86_64 patterns-openSUSE-x11-12.2-5.5.1.x86_64 patterns-openSUSE-enhanced_base-12.2-5.5.1.x86_64 patterns-openSUSE-fonts-12.2-5.5.1.x86_64 patterns-openSUSE-non_oss-12.2-5.5.1.x86_64 patterns-openSUSE-minimal_base-12.2-5.5.1.x86_64 patterns-openSUSE-x11_opt-12.2-5.5.1.x86_64 patterns-openSUSE-imaging-12.2-5.5.1.x86_64 patterns-openSUSE-sw_management-12.2-5.5.1.x86_64 patterns-openSUSE-non_oss_opt-12.2-5.5.1.x86_64 patterns-openSUSE-kde4_basis-12.2-5.5.1.x86_64 patterns-openSUSE-yast2_install_wf-12.2-5.5.1.x86_64 patterns-openSUSE-yast2_basis-12.2-5.5.1.x86_64
------------------------------------------------------------------------------
A diff of those two outputs :
--- pre_pattern.txt 2012-10-30 09:58:46.123122931 -0400 +++ post_pattern.txt 2012-10-30 10:09:09.267068467 -0400 @@ -1,7 +1,13 @@ patterns-openSUSE-base-12.2-5.5.1.x86_64 +patterns-openSUSE-x11-12.2-5.5.1.x86_64 patterns-openSUSE-enhanced_base-12.2-5.5.1.x86_64 patterns-openSUSE-fonts-12.2-5.5.1.x86_64 +patterns-openSUSE-non_oss-12.2-5.5.1.x86_64 patterns-openSUSE-minimal_base-12.2-5.5.1.x86_64 +patterns-openSUSE-x11_opt-12.2-5.5.1.x86_64 +patterns-openSUSE-imaging-12.2-5.5.1.x86_64 patterns-openSUSE-sw_management-12.2-5.5.1.x86_64 +patterns-openSUSE-non_oss_opt-12.2-5.5.1.x86_64 +patterns-openSUSE-kde4_basis-12.2-5.5.1.x86_64 patterns-openSUSE-yast2_install_wf-12.2-5.5.1.x86_64 patterns-openSUSE-yast2_basis-12.2-5.5.1.x86_64
Some patterns remain, even though they were just installed as dependencies for kde4 pattern and should be classified as optional.
Reproducible: Always
Steps to Reproduce: 1. Install a pattern that pulls in other (not yet installed) patterns 2. Uninstall that pattern with zypper rm -u 3. Subpatterns that were installed as dependencies in 1. are still installed. Actual Results: Pulled in subpatterns remain installed
Expected Results: Pulled in subpatterns should be removed if they were not explictly installed by user and are not depended upon by some other packages
openSUSE 12.2 ;
libzypp 11.6.2-2.1.2.x86_64 zypper-1.7.3-1.2.2.x86_64
https://bugzilla.novell.com/show_bug.cgi?id=787382
https://bugzilla.novell.com/show_bug.cgi?id=787382#c1
--- Comment #1 from Michael Schröder mls@suse.com 2012-10-30 14:35:44 UTC --- That's because I consider all installed pattern packages that have the "isvisible" flag set userinstalled. I need to do this because the zypp history file doesn't contain patterns. ;-(
https://bugzilla.novell.com/show_bug.cgi?id=787382
https://bugzilla.novell.com/show_bug.cgi?id=787382#c2
Christian Boltz suse-beta@cboltz.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |suse-beta@cboltz.de
--- Comment #2 from Christian Boltz suse-beta@cboltz.de 2012-11-02 22:18:32 CET --- (In reply to comment #1)
I need to do this because the zypp history file doesn't contain patterns. ;-(
Sure? AFAIK patterns are (dummy) packages nowadays, and my /var/log/zypp/history _does_ contain some patterns.
https://bugzilla.novell.com/show_bug.cgi?id=787382
https://bugzilla.novell.com/show_bug.cgi?id=787382#c3
--- Comment #3 from Michael Schröder mls@suse.com 2012-11-05 10:10:04 UTC --- Yes, I'm sure. While it's true that we have "pattern-" packages in openSUSE, the patterns still exist as a separate entity that simply require the rpm packages. The problem is that for the zypp history file this means that the rpm "pattern-" packages get flagged as "installed because of a dependency", so the information that the user selected a pattern is lost.
https://bugzilla.novell.com/show_bug.cgi?id=787382
https://bugzilla.novell.com/show_bug.cgi?id=787382#c4
--- Comment #4 from Christian Boltz suse-beta@cboltz.de 2012-11-05 14:46:08 CET --- Ah, I didn't know this detail. Thanks for the explanation!
https://bugzilla.novell.com/show_bug.cgi?id=787382
https://bugzilla.novell.com/show_bug.cgi?id=787382#c5
Chris Gnineil panaqolus@ewetel.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |panaqolus@ewetel.net
--- Comment #5 from Chris Gnineil panaqolus@ewetel.net 2013-01-06 17:19:39 UTC --- The developers are aware of it. The TODO file (src.rpm) lists this feature as "we want it". Still listed in current zypper (1.8.7).
From TODO file:
--------------------------------- NOT SCHEDULED -------------
+ - we want it ? - idea [...] Patterns
+ implement pattern removal -------------------------------
http://bugzilla.novell.com/show_bug.cgi?id=787382 http://bugzilla.novell.com/show_bug.cgi?id=787382#c7
Michael Andres ma@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #7 from Michael Andres ma@suse.com --- Nowadays libsolv itself keeps track of the 'autionstalled' status (incl. patterns). They are no longer derived from the history, but stored in /var/lib/zypp/AutoInstalled.
Feel free to reopen the bug, if you still experience problems.