[Bug 738677] New: "zypper refresh" deletes entire raw metadata cache
https://bugzilla.novell.com/show_bug.cgi?id=738677 https://bugzilla.novell.com/show_bug.cgi?id=738677#c0 Summary: "zypper refresh" deletes entire raw metadata cache Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: x86-64 OS/Version: SuSE Other Status: NEW Severity: Minor Priority: P5 - None Component: libzypp AssignedTo: zypp-maintainers@forge.provo.novell.com ReportedBy: dr.tino.k@gmail.com QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20100101 Firefox/8.0 # zypper refresh deletes the entire raw metadata cache under /var/cache/zypp/raw which is highly undesirable when working with multiple repo definition directories (using the zypper -D /--reposd-dir switch). E.g. if /etc/zypp/repos.d/ contains all local repositories (dvd, nfs) and /etc/zypp/repos.d/remote/ contains all remote repositories (ftp, http), then a "zypper refresh" as root deletes all metadata including those for the remote repos and a zypper -D /etc/zypp/repos.d/remote/ search some_package as normal user retuns erros like Warning: The metadata cache needs to be built for the ... repository. You can run 'zypper refresh' as root to do this. Disabling repository ... Workaround: remove the following lines and recompile libzypp from source: RepoManager.cc, line 575 // delete metadata folders without corresponding repo (e.g. old tmp directories) if ( filesystem::readdir( entries, options.repoRawCachePath, false ) == 0 ) { std::set<string> oldfiles; repo_esc_aliases.sort(); entries.sort(); set_difference(entries.begin(), entries.end(), repo_esc_aliases.begin(), repo_esc_aliases.end(), std::inserter(oldfiles, oldfiles.end())); for_(it, oldfiles.begin(), oldfiles.end()) { filesystem::recursive_rmdir(options.repoRawCachePath / *it); } } Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=738677 https://bugzilla.novell.com/show_bug.cgi?id=738677#c1 Michael Andres <ma@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #1 from Michael Andres <ma@suse.com> 2012-01-11 11:03:23 CET --- Interesting usecase. --reposd-dir is mainly used by image builders like KIWI to just relocate the directory. We did not expect someone to use different repo sets to maintain a single system. Personally I see more potential harm than benefit in doing this, becasue zypper/YaST will never see the 'whole picture'. But if this works for you, you should also separate the cache trees using '-C, --cache-dir <dir>': zypper -D /etc/zypp/repos.d/remote -C /var/cache/zypp/remote As it is legal to add/remove repos by simply creating/removing a /etc/zypp/repos.d entry, the code you mentioned is needed to find and cleanup orphaned metadata caches. We don't want to disable this. NOTE: I found the man page being wrong/outdated. -C actually relocates the whole cache tree (default /var/cache/zypp/); not just the solv files as stated in the man page (will be fixed). '-C /var/cache/zypp/remote' will lead to tree like this: /var/cache/zypp/remote/ /raw/ /solv/ /packages/ -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=738677 https://bugzilla.novell.com/show_bug.cgi?id=738677#c2 --- Comment #2 from Michael Andres <ma@suse.com> 2012-01-11 12:08:08 CET --- (manpage fixed for zypper-1.6.21) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=738677 https://bugzilla.novell.com/show_bug.cgi?id=738677#c3 --- Comment #3 from Bernhard Wiedemann <bwiedemann@suse.com> 2012-02-07 14:00:08 CET --- This is an autogenerated message for OBS integration: This bug (738677) was mentioned in https://build.opensuse.org/request/show/103028 Factory / permissions -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=738677 https://bugzilla.novell.com/show_bug.cgi?id=738677#c4 --- Comment #4 from Bernhard Wiedemann <bwiedemann@suse.com> 2012-02-08 10:00:16 CET --- This is an autogenerated message for OBS integration: This bug (738677) was mentioned in https://build.opensuse.org/request/show/103176 Factory / permissions -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com