Bug 160792 - /var/lib/zypp/db/selections is growing with each update
Summary: /var/lib/zypp/db/selections is growing with each update
Status: RESOLVED FIXED
: 158364 165825 (view as bug list)
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: libzypp (show other bugs)
Version: Beta 8
Hardware: Other Other
: P5 - None : Critical (vote)
Target Milestone: ---
Assignee: Duncan Mac-Vicar
QA Contact: Klaus Kämpf
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-25 16:46 UTC by Andreas Jaeger
Modified: 2006-04-25 06:37 UTC (History)
5 users (show)

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


Attachments
zypp-storedel.patch (3.37 KB, patch)
2006-04-21 10:21 UTC, Martin Vidner
Details | Diff
zypp-createsel.patch (726 bytes, patch)
2006-04-21 13:54 UTC, Martin Vidner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Jaeger 2006-03-25 16:46:09 UTC
With each update, new entries are written to the directory but previous ones are never removed:
x40:/var/lib/zypp/db/selections # l
total 436
-rw-r--r-- 1 root root  8772 Mar  1 14:23 02fa83b33119e4de7ebb4c7778e4907a
-rw-r--r-- 1 root root  4323 Mar 24 14:44 148a291dae423097cd9603506eb44aae
-rw-r--r-- 1 root root 21498 Mar 15 20:15 2bde63c2a5b975457ed13069949ac215
-rw-r--r-- 1 root root 13141 Mar  1 14:23 2c22fde7a327d60aa9be46670b70fa5a
-rw-r--r-- 1 root root 20238 Mar  9 09:19 380f0a2f8c8e1c40bc8c498fbafcbef9
-rw-r--r-- 1 root root 20358 Mar 15 20:15 4036a0f2a2ee0f14866f6732d2e733be
-rw-r--r-- 1 root root 14224 Mar  1 14:23 409a1ab95ec385efb45ef2e56cf12572
-rw-r--r-- 1 root root  4781 Mar  1 14:23 45c579796aa999f98bdcf85f6fa7f3d9
-rw-r--r-- 1 root root  8771 Feb 23 18:51 48edb14a8cb620a18315931a40a8cef0
-rw-r--r-- 1 root root  4448 Mar  1 14:23 4e42ded4778ec46ece58a032d9eba84b
-rw-r--r-- 1 root root 23655 Mar 24 14:44 5756bb1a5a5eef778b44ae916886d221
-rw-r--r-- 1 root root  4998 Mar 15 20:15 583eb0272467e15a54482a3b27b48638
-rw-r--r-- 1 root root 11577 Mar 15 20:15 5cc32b55879d09b2e2f52e9cfb045d3c
-rw-r--r-- 1 root root  4644 Mar  9 09:19 61057bb0969adaafec785bb0eb575eda
-rw-r--r-- 1 root root  4778 Mar 15 20:15 6f6d41eae493e591e7da11a6eb77b10b
-rw-r--r-- 1 root root 18010 Mar  9 09:19 7316c4c13f650da20ffb3f3fb151e1b0
-rw-r--r-- 1 root root 14223 Feb 23 18:51 7637ecfa127590f18b7ce164c68dc6cb
-rw-r--r-- 1 root root 14690 Feb 23 18:51 8542aa7ec3f6a454de49356f3ec71087
-rw-r--r-- 1 root root  4357 Feb 23 18:51 8764f5a06c25e2d1689403d936c17abe
-rw-r--r-- 1 root root 11332 Mar  9 09:19 9bb1a30ce3ecfce08dabda1b23e54aa6
-rw-r--r-- 1 root root 20503 Mar 24 14:44 a0290b5cfc11d36a474a29db91fab182
-rw-r--r-- 1 root root 18132 Mar 15 20:15 a992ee2b2ee01d68480e2de7f002b68b
-rw-r--r-- 1 root root 21413 Mar  9 09:19 b7c0d3298597d2eb743ca47be7879363
-rw-r--r-- 1 root root  4780 Feb 23 18:51 bd1a8f3cbe12b396305b6a00084ad632
-rw-r--r-- 1 root root  5326 Mar 24 14:44 bd4813cf0fa1bf61ce8bd59496cf5af1
-rw-r--r-- 1 root root 13140 Feb 23 18:51 d384867a0db01e195bb73f3487a27390
-rw-r--r-- 1 root root 14649 Mar  1 14:23 dac5471f047b76fc9071818292dc9e85
-rw-r--r-- 1 root root  4926 Mar  9 09:19 dfd2d57b4f5317fc7d85447be20aefa4
-rw-r--r-- 1 root root 18733 Mar 24 14:44 eb0c5d8bd9d0f016b1cf00f7a3a98ac5
-rw-r--r-- 1 root root 15689 Mar 24 14:44 f8a99699317dba11997f5edffc0a0538

Now I have duplicated selections:
x40:/var/lib/zypp/db/selections # grep "<summary>" *
02fa83b33119e4de7ebb4c7778e4907a:<summary>Graphical Base System</summary>
148a291dae423097cd9603506eb44aae:<summary>Basic Sound Libraries and Tools</summary>
2bde63c2a5b975457ed13069949ac215:<summary>Min</summary>
2c22fde7a327d60aa9be46670b70fa5a:<summary>Standard System with KDE</summary>
380f0a2f8c8e1c40bc8c498fbafcbef9:<summary>KDE Desktop Environment</summary>
4036a0f2a2ee0f14866f6732d2e733be:<summary>KDE Desktop Environment</summary>
409a1ab95ec385efb45ef2e56cf12572:<summary>Min</summary>
45c579796aa999f98bdcf85f6fa7f3d9:<summary>Basic Sound Libraries and Tools</summary>
48edb14a8cb620a18315931a40a8cef0:<summary>Graphical Base System</summary>
4e42ded4778ec46ece58a032d9eba84b:<summary>Help and Support Documentation</summary>
5756bb1a5a5eef778b44ae916886d221:<summary>KDE Desktop Environment</summary>
583eb0272467e15a54482a3b27b48638:<summary>Basic Sound Libraries and Tools</summary>
5cc32b55879d09b2e2f52e9cfb045d3c:<summary>Graphical Base System</summary>
61057bb0969adaafec785bb0eb575eda:<summary>Help and Support Documentation</summary>
6f6d41eae493e591e7da11a6eb77b10b:<summary>Help and Support Documentation</summary>
7316c4c13f650da20ffb3f3fb151e1b0:<summary>Standard System with KDE</summary>
7637ecfa127590f18b7ce164c68dc6cb:<summary>Min</summary>
8542aa7ec3f6a454de49356f3ec71087:<summary>KDE Desktop Environment</summary>
8764f5a06c25e2d1689403d936c17abe:<summary>Help and Support Documentation</summary>
9bb1a30ce3ecfce08dabda1b23e54aa6:<summary>Graphical Base System</summary>
a0290b5cfc11d36a474a29db91fab182:<summary>Min</summary>
a992ee2b2ee01d68480e2de7f002b68b:<summary>Standard System with KDE</summary>
b7c0d3298597d2eb743ca47be7879363:<summary>Min</summary>
bd1a8f3cbe12b396305b6a00084ad632:<summary>Basic Sound Libraries and Tools</summary>
bd4813cf0fa1bf61ce8bd59496cf5af1:<summary>Help and Support Documentation</summary>
d384867a0db01e195bb73f3487a27390:<summary>Standard System with KDE</summary>
dac5471f047b76fc9071818292dc9e85:<summary>KDE Desktop Environment</summary>
dfd2d57b4f5317fc7d85447be20aefa4:<summary>Basic Sound Libraries and Tools</summary>
eb0c5d8bd9d0f016b1cf00f7a3a98ac5:<summary>Graphical Base System</summary>
f8a99699317dba11997f5edffc0a0538:<summary>Standard System with KDE</summary>
Comment 1 Duncan Mac-Vicar 2006-04-03 15:28:38 UTC
Klaus, when selections are upgraded, how does it works, are they "uninstalled" too?
Comment 2 Klaus Kämpf 2006-04-03 15:40:30 UTC
Yes, they should. Same with any kind of resolvable.
Comment 3 Klaus Kämpf 2006-04-13 16:01:40 UTC
*** Bug 165825 has been marked as a duplicate of this bug. ***
Comment 4 Klaus Kämpf 2006-04-13 16:09:24 UTC
Its a generic bug in target/store (resp. target/TargetImpl.cc)

target::store::storeObject() must match the rpm semantics with "rpm -I" and "rpm -U".
Currently, it looks like storeObject() always adds to the store (rpm -I semantics) instead of replacing an already existing resolvable with same name and kind.

For packages, there is the 'installOnly()' attribute. All other resolvables should match the 'rpm -U' behaviour.
Comment 8 Jean-Daniel Dodin 2006-04-14 13:05:25 UTC
I don't know if it's really the same bug?
After a fresh minimal text install, I can't add installation sources (ftp or cd). I _can_ set them, but as soon as I try to go to software install there are unset and a message say "you have no install source". The install source show now "stopped"
10.1RC1
(vmware, 128Mbram)
Comment 9 Martin Vidner 2006-04-18 06:41:32 UTC
Jean-Daniel: if unsure, always open a separate bug. So do it now otherwise your report will get lost.
Comment 10 Jean-Daniel Dodin 2006-04-18 07:51:34 UTC
Bug 167239 Submitted
Comment 14 Martin Vidner 2006-04-21 08:52:10 UTC
looking now
Comment 15 Martin Vidner 2006-04-21 10:21:27 UTC
Created attachment 79390 [details]
zypp-storedel.patch

I put this to libzypp rev 3164
Comment 16 Klaus Kämpf 2006-04-21 11:18:59 UTC
Ack, thanks.
Comment 17 Martin Vidner 2006-04-21 13:05:18 UTC
It does not work. When the code tries to delete 'Basis-Devel-10.1-42', it looks for a filename corresponding to 'Basis-Devel'.
Comment 18 Martin Vidner 2006-04-21 13:54:38 UTC
Created attachment 79445 [details]
zypp-createsel.patch

This fixes XMLFilesBackend::createSelection to read the edition from the store.

Duncan, should we also read the arch like in createPattern instead of using Arch_noarch?
Comment 19 Duncan Mac-Vicar 2006-04-21 14:25:38 UTC
I don't know if selection supported arch before, but if they do, then the patch is correct.
Comment 20 Martin Vidner 2006-04-21 15:46:04 UTC
My code in comment 15 is wrong in that it will try to remove the same item over and over because it gets deleted only from the store and not from the pool. Any hint how to fix it?
Comment 21 Martin Vidner 2006-04-21 16:12:39 UTC
An easy way out would be to delete only one matching item instead of all of them. If we do not upgrade from a previous release with this bug, there will be only one anyway.
Comment 22 Martin Vidner 2006-04-21 16:48:24 UTC
Committed to svn. Please advise me about a better fix or close.
Comment 24 Klaus Kämpf 2006-04-22 15:22:51 UTC
Fix looks ok
Comment 27 Andreas Jaeger 2006-04-25 06:37:48 UTC
*** Bug 158364 has been marked as a duplicate of this bug. ***