Bug 718840

Summary: zypper shell: repo enable/disable/add ineffective
Product: [openSUSE] openSUSE 12.1 Reporter: Will Stephenson <wstephenson>
Component: libzyppAssignee: E-mail List <zypp-maintainers>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Enhancement    
Priority: P3 - Medium CC: vuntz
Version: RC 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Will Stephenson 2011-09-19 09:03:07 UTC
This is a recurrence of 297147: if I add/remove/enable/disable repos using zypper sh, subsequent searches and resolves do not reflect the changed set of repos, although lr does show the changes.

Tested with zypper 1.5.4 and 1.6.15.

To reproduce:
# zypper sh
zypper> se -s somepackage-provided-by-multiple-repos
<search results #1>
zypper> mr -d <one-repo-providing-somepackage>
zypper> se -s somepackage
<search results #1, unchanged>

The same commands as separate zypper calls from the shell have the expected results.
Comment 1 Vincent Untz 2011-10-21 09:20:36 UTC
Still in rc1...
Comment 2 Michael Andres 2011-10-28 10:50:01 UTC
Repo actions directly operate on the .repo files in /etc/zypp.repos.d. Changing those files does not affect the current content loaded in memory, it affects the content loaded the next time zypper builds it's pool.

As separate zypper calls, each call builds it's pool based on the current /etc/zypp.repos.d content, that's why it works.

But 'zypper sh' loads the pool once on startup. Avoiding the pool loading was the reason for providing 'zypper sh'.

We can think about an explicit 'rebuildpool' command to sync the /etc/zypp.repos.d changes bach to memory. 

But basically the behavior is not wrong.
Comment 3 Michael Andres 2016-02-05 11:18:47 UTC
wontfix