https://bugzilla.novell.com/show_bug.cgi?id=887188 https://bugzilla.novell.com/show_bug.cgi?id=887188#c0 Summary: zypper cache dir cannot be changed; does not honor "-C" or any settings via "--config" Classification: openSUSE Product: openSUSE 11.4 Version: Final Platform: x86-64 OS/Version: openSUSE 11.1 Status: NEW Severity: Major Priority: P5 - None Component: libzypp AssignedTo: zypp-maintainers@forge.provo.novell.com ReportedBy: richard.steenwyk@ge.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- Created an attachment (id=598527) --> (http://bugzilla.novell.com/attachment.cgi?id=598527) Template for defining local working directory as a repository User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36 Using zypper1.3.7 on SLES11.1 'cachedir' hierarchy is explained well in /etc/zypp/zypp.conf and changing the setting there works as expected. I desire to set the cache directory to something other than /var/cache/zypp/... for execution as a non-root user, meaning that modifying /etc/zypp/zypp.conf is not an option Bugs: 1. "-C" command line option has no effect a. Similarly, "--raw-cache-dir" has no effect either 2. Adding "cachedir" setting to "~/.zypper.conf" has no effect 3. Authoring own "zypp.conf" and supplying via "--config" has no effect Config file access was confirmed with strace as increasing logging verbosity (2+) doesn't produce any additional diagnostic messages Reproducible: Always Steps to Reproduce: 1. Create a repo in a local directory with "createrepo ." 2. Using attached template file, define the local directory as a(n empty) repository 3. Run "zypper -C . lr" 4. Observe that zypper knows about the local file-based (empty) repository 5. Run "zypper -D . search something" 6. Observe failure with root cause: "Can't provide /repodata/repomd.xml : Can't create /repodata" indicating that path to cache directory isn't accessible 7. Run "zypper -D . -C . search something" 8. Observe same failure with root cause: "Can't provide /repodata/repomd.xml : Can't create /repodata" indicating that path to cache directory isn't accessible, except "-C" option should've provided it 9. Copy system config file "/etc/zypp/zypp.conf" to local directory, edit to specify "cachedir = <local working directory>" 10. Run "zypper -D . -c zypp.conf search something" 11. Observe same failure with root cause: "Can't provide /repodata/repomd.xml : Can't create /repodata" indicating that path to cache directory isn't accessible, except "-c" option should've supplied config file containing this setting 12. Run "zypper -D . -C . --raw-cache-dir . search something" 13. Observe similar failure with root cause: "Error building the cache: 'repo2solv.sh' '-o' '/var/cache/zypp/solv/EmptyLocal/solv' './EmptyLocal' /usr/bin/repo2solv.sh: line 67: /var/cache/zypp/solv/EmptyLocal/solv: No such file or directory Problem loading data from 'EmptyLocal' Resolvables from 'EmptyLocal' not loaded because of error." indicating that path to cache directory isn't accessible, except "-C" and "--raw-cache-dir" options should've provided it 14. Edit system config "/etc/zypp/zypp.conf" to specify "cachedir = <local working directory>" 15. Run "zypper -D . --no-gpg-checks search something" 16. Observe success in building (empty) repository cache, confirmed by creation of "raw" and "solv" cache directory hierarchies in the local working directory and no errors reported by zypper Actual Results: Inlined with "Steps to Reproduce" Note that all invocations of zypper during these steps will have a return code of zero; one must examine the (limited) error messages to see the problem Expected Results: The cache directory hierarchy should've been rooted using the value supplied through any one of the three means described above. Increasing output verbosity adds some additional context. From one example ("zypper -D . -C . --no-gpg-checks -vvvv se something"): Verbosity: 4 Entering 'no-gpg-checks' mode. Non-option program arguments: 'something' Initializing Target Repository 'EmptyLocal' is out-of-date. You can run 'zypper refresh' as root to update it. Loading repository data... Retrieving repository 'EmptyLocal' data... Checking whether to refresh metadata for EmptyLocal Retrieving repository 'EmptyLocal' metadata [error] Repository 'EmptyLocal' is invalid. History: - Can't create /repodata - Can't provide /repodata/repomd.xml : Can't create /repodata - [|] Valid metadata not found at specified URL(s) Please check if the URIs defined for this repository are pointing to a valid repository. Problem loading data from 'EmptyLocal' Resolvables from 'EmptyLocal' not loaded because of error. Reading installed packages... Force resolution: No No packages found. -- 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.