Bug 157877 - rug will remove packages and break dependencies.
Summary: rug will remove packages and break dependencies.
Status: RESOLVED FIXED
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Zenworks (show other bugs)
Version: Beta 7
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Duncan Mac-Vicar
QA Contact: Mauro Parra Miranda
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-14 09:26 UTC by Andreas Jaeger
Modified: 2006-05-15 22:14 UTC (History)
4 users (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
zmd-backend log (817.26 KB, application/x-bzip2)
2006-03-14 09:28 UTC, Andreas Jaeger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Jaeger 2006-03-14 09:26:43 UTC
xgnokii is installed and needs gnokii.  Trying to remove gnokii succeeds nevertheless:

aj@x40aj:~> rug rm gnokii
Resolving Dependencies...

The following packages will be removed:
  gnokii 0.6.10-6 (System)


Transaction...
                                                                           100%

Transaction Finished
aj@x40aj:~> rpm -q gnokii xgnokii
package gnokii is not installed
xgnokii-0.6.10-6
aj@x40aj:~> verify-rpm.sh
Unsatisfied dependencies for xgnokii-0.6.10-6.i586: gnokii, libgnokii.so.2

This is with current autobuild packages as of 2006-03-14.
Comment 1 Andreas Jaeger 2006-03-14 09:28:38 UTC
Created attachment 72725 [details]
zmd-backend log
Comment 2 Naresh Wignarajah 2006-03-14 23:41:54 UTC
This is exactly why installing, updating and uninstalling by default with --force and --nodeps is a bad idea.  See suse-packages discussion, we have been trying to point this out for ages.  See #157481, #158062 etc.  It's a libzypp problem.
Comment 3 Andreas Jaeger 2006-03-15 08:24:24 UTC
This has nothing to do with force and nodeps IMO.

libzypp should not call rpm at all in this case but tell the user that this will introduce a conflict.
Comment 4 Duncan Mac-Vicar 2006-03-15 11:52:19 UTC
That is connected with https://bugzilla.novell.com/show_bug.cgi?id=158062 

If A requires B and you remove B, A should be marked for uninstallation. Thats how Zenworks did it before, how apt does it. You can tell the user at application level that if the package list contains kernel or glibc the system will not work. But at a solver level (packages are all members of the same world), they should be marked for uninstallation.
Comment 5 Stefan Schubert 2006-03-15 12:38:55 UTC
I fear that is not a solver problem. A testcase based on rpm return the correct things:

>!> Uninstalling gnokii
>!> 1 problems found:
>!> Problem:
>!> xgnokii has missing dependencies
>!> There are no alternative installed providers of gnokii for xgnokii-0.6.10-6.i586
>!>    Solution:
>!>       keep gnokii
>!>       keep gnokii-0.6.10-6.i586
>!>    Solution:
>!>       delete xgnokii
>!>       delete xgnokii-0.6.10-6.i586
>!>    Solution:
>!>       Ignore this requirement just here
>!>       

Next I try the ZEN environment
Comment 6 Duncan Mac-Vicar 2006-03-15 14:11:14 UTC
I am debugging the Zen backend for zypp. I suspect the dependencies are readed differently from rpm than from sqlite.
Comment 7 Klaus Kämpf 2006-03-15 15:46:15 UTC
Huh ? This should be fixed by #157684

The bug is that packages where added to the pool _two_ times. So removal of one copy still retained the other copy so the no dependencies broke.

The zmd-backend log from comment #1 still shows this bug.

Aj, does libzypp-zmd-backend include this ?
-------------------------------------------------------------------
Tue Mar 14 01:40:01 CET 2006 - kkaempf@suse.de

- insert packages and patches to pool (#157684).
- dont collect error lines but output them directly.
- rev 2457
Comment 8 Duncan Mac-Vicar 2006-03-15 16:30:43 UTC
Except for the splitcap provides, the requires seems to be parsed ok. Note, we are using zypp, zmd, and zmd backend from stable.

2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):44 4326: [package]xgnokii-0.6.10-6.i586
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):45 BEGIN ----------------------------
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 Dependencies: [
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 PROVIDES:
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) xgnokii == 0.6.10-6
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (splitcap) okii:/uur/ssareexgnnkii
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 REQUIRES:
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libc.so.6
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libc.so.6(GLIBC_2.3)
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libdl.so.2
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libc.so.6(GLIBC_2.4)
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libX11.so.6
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libc.so.6(GLIBC_2.1)
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libpthread.so.0(GLIBC_2.0)
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libpthread.so.0
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libc.so.6(GLIBC_2.0)
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libm.so.6
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libz.so.1
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libXext.so.6
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libc.so.6(GLIBC_2.3.4)
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libc.so.6(GLIBC_2.1.3)
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libgmodule-2.0.so.0
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libpthread.so.0(GLIBC_2.1)
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libgdk-x11-2.0.so.0
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libatk-1.0.so.0
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libgtk-x11-2.0.so.0
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libpthread.so.0(GLIBC_2.3.2)
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libglib-2.0.so.0
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libgdk_pixbuf-2.0.so.0
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libgobject-2.0.so.0
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libpango-1.0.so.0
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libfontconfig.so.1
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libresmgr.so.1
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libcairo.so.2
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libfreetype.so.6
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libXrender.so.1
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libglitz.so.1
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libpangocairo-1.0.so.0
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libpng12.so.0
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libpangoft2-1.0.so.0
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libexpat.so.1
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libXpm.so.4
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libbluetooth.so.1
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) libgnokii.so.2
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 [package] (namedcap) gnokii
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46 ]
2006-03-15 17:08:17 
Comment 9 Stefan Schubert 2006-03-15 16:47:52 UTC
Re comment #7
It seems not:

x40aj:~ # rpm -q --changelog libzypp-zmd-backend 
* So Mär 12 2006 - kkaempf@suse.de
- honor 'kind' attribute in resolvables table (#157497)
- properly read patches from sqlite tables.
- rev 2432

* So Mär 12 2006 - kkaempf@suse.de
- improve transact report messaging (#157337, partly)
- workaround for #157469
- rev 2427

* Sa Mär 11 2006 - kkaempf@suse.de
- Implement 'update-status' helper (#156420)
- rev 2419

* Fr Mär 10 2006 - kkaempf@suse.de
- Fill package_url attribute (#156742)
- rev 2406 (needs libzypp revision >= 2406)

* Do Mär 09 2006 - kkaempf@suse.de
- Implemented CD change callback.
- rev 2377

* Mi Mär 08 2006 - kkaempf@suse.de
- only write package_filename if zypp knows how to get the package
  (cd, dvd, nfs, smb sources). Else leave it empty and let ZMD
  do the download. (#156076)
- rev 2362

* Mi Mär 08 2006 - kkaempf@suse.de
- use given, not internal catalog name.
- rev 2360

* Di Mär 07 2006 - kkaempf@suse.de
- split of from libzypp main package.
- bump version to 7.1.1 so its in sync with zmd.
- add logrotate config.
Comment 10 Duncan Mac-Vicar 2006-03-15 16:49:30 UTC
As Klaus says, the bug is packages get inserted twice into the pool. I just dumped the pool from sqlite:

3066: [package]gnokii-0.6.10-6.i586
4326: [package]xgnokii-0.6.10-6.i586
455: [package]gnokii-0.6.10-6.i586
685: [package]xgnokii-0.6.10-6.i586

So this should be fixed already.
Comment 11 Klaus Kämpf 2006-03-15 22:23:46 UTC
Right.
Comment 12 Stefan Schubert 2006-03-16 07:57:13 UTC
Duncan, could you please check, why the output is so "ugly":

PROVIDES:
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46
[package] (namedcap) xgnokii == 0.6.10-6
2006-03-15 17:08:17 <1> piscola(5072) [DEFINE_LOGGROUP] sources.cc(main):46
[package] (splitcap) okii:/uur/ssareexgnnkii

             
Comment 13 Stefan Schubert 2006-03-16 07:58:06 UTC
Set to normal
Comment 14 Duncan Mac-Vicar 2006-03-16 10:51:22 UTC
the output it is not ugly, I can see the same in the sqlite database. May be the bug is when reading the target and writing the db.
Comment 15 Andreas Jaeger 2006-04-29 15:02:50 UTC
btw. the original bug report is fixed.
Comment 16 Mauro Parra Miranda 2006-05-15 22:14:43 UTC
Yup, looks like working now. Closing as fixed. 

local100:~ # rug rm gnokii
Resolving Dependencies...

The following packages will be removed:
  gnokii 0.6.10-13 (system)
  xgnokii 0.6.10-13 (system)
    xgnokii-0.6.10-13.i586[System packages] dependend on gnokii
    xgnokii-0.6.10-13.i586[System packages] is missing the requirement libgnokii.so.2


Proceed with transaction? (y/N) n

Tested on SLES 10 RC1 i386.