[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
https://bugzilla.novell.com/show_bug.cgi?id=738677
https://bugzilla.novell.com/show_bug.cgi?id=738677#c2
--- Comment #2 from Michael Andres
https://bugzilla.novell.com/show_bug.cgi?id=738677
https://bugzilla.novell.com/show_bug.cgi?id=738677#c3
--- Comment #3 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=738677
https://bugzilla.novell.com/show_bug.cgi?id=738677#c4
--- Comment #4 from Bernhard Wiedemann
participants (1)
-
bugzilla_noreply@novell.com