[Bug 1204956] New: Cached repo packages are deleted
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956 Bug ID: 1204956 Summary: Cached repo packages are deleted Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.4 Hardware: Other OS: openSUSE Leap 15.4 Status: NEW Severity: Normal Priority: P5 - None Component: libzypp Assignee: zypp-maintainers@suse.de Reporter: bugz57@top.geek.nz QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- OpenSUSE doesn't have a mechanism for caching repo content locally for sharing between hosts, mirrors around here can be slow and bad, plus I see it as bad style to waste server bandwidth. So the next best thing is sharing /var/cache/zypp/packages/. That works only if the configured repos on all hosts are identical. Any host which does not have a repo configured proceeds to simply delete all cached content of that repo. Please - not having a downloaded-rpms-cache is pretty bad in my opinion, but going out of the way to delete already downloaded data is not acceptable. It is my understanding that the package updates are controlled by the repo metadata anyway that is downloaded when refreshing repos, and there should be no need to delete any already downloaded rpm. Old hardware these days is likely RAM bound, but not disk-space bound, and anyone really having space problems can manually delete /var/cache/zypp/packages/ without detriment to future package updates. Can zypper please refrain from deleting any already downloaded rpms/drpms? -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956#c1
Andreas Stieger
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956#c2
Volker Kuhlmann
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956#c3
Benjamin Zeller
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956#c4
--- Comment #4 from Volker Kuhlmann
You can enable keep-packages per repo ( see zypper modifyrepo --keep-packages ) so that zypper does not delete rpms anymore after installing them.
That is not correct, sorry. Yes, enabling keeppackages is necessary for anything to be kept, and is enabled for all repos. But it does not stop zypper from obliterating all /var/cache/zypp/packages/*/ for which there is no repo configured (because this particular host doesn't need it, or because one hasn't got that far yet after system installation). This is what this bug report is about.
A possibility would be to use plain dir repos for all but one host, e.g. after installing the packages on one host that has keep-packages enabled you copy them to a shared directory that the others use as repository.
I don't really have one master host, and any host may put new packages into the cache, depending on which is updated first etc. (keeppackages is already enabled everywhere). -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956#c5
--- Comment #5 from Andreas Stieger
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956#c6
--- Comment #6 from Volker Kuhlmann
What the user wants is a zero-setup, distributed cache on a shared writable path, invalidation without central instance or consensus, but with resilience against hosts that are configured what he calls "anti-social" - DWIM.
I don't need invalidation, everything in the cache has been installed on at least one host. I don't expect to have to deal with malicious hosts. What I called anti-social is zypper deleting complete repos which on that particular host are irrelevant to start with. zypper could just keep its fingers off areas it is not involved in. I understand RMT to be creating complete mirrors of repos, I don't need all those GBytes.
You could build something opportunistic with rsync.
Done, that's how I noticed stuff disappearing. -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956#c7
--- Comment #7 from Michael Andres
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956#c8
--- Comment #8 from Michael Andres
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956#c9
Michael Andres
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956#c10
--- Comment #10 from Volker Kuhlmann
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956
http://bugzilla.opensuse.org/show_bug.cgi?id=1204956#c11
--- Comment #11 from Michael Andres
What are the semantics of "keeppackages must be turned on" here? Logically it must be turned on for keeping any downloaded package. But what if there are repos configured for which it is off, because it doesn't make sense to keep packages from the distro DVD ISO file?
That's fine - you just need to turn it on for the repos you want to keep. But it must be turned on on all clients then. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com