Ticket #920 (closed defect: fixed)
Package provides are resolved incorrectly with multiple apt sources
Reported by: | https://www.google.com/accounts/o8/id?id=AItOawl5-bwrxN_3riwrFWHgfESsuK8Bn6HsQ2M | Owned by: | desai |
---|---|---|---|
Priority: | major | Milestone: | Bcfg2 1.1.0 Release |
Component: | bcfg2-server | Version: | 1.0 |
Keywords: | Cc: |
Description
version: 1.0.1-1~ppa2~hardy2 with Packages.py from svn [13349a073ff785fac7901038f980870bd508cbff] (SVN r6014)
We are running Lucid on the workstations where we found this bug. We have different aptsources for ubuntu, ubuntu-updates, ubuntu-security and ubuntu-backports. The machines in the ludid64 profile use all of them.
We are having trouble with packages that provide notification-daemon. The two common ones, notify-osd and xfce4-notifyd, conflict with each other. The ubuntu APTSource includes both of those packages and correctly returns them both(and two others) when get_provides() is run. ubuntu-updates has only xfce4-notifyd, so get_provides() only returns xfce4-notifyd.
Packages.complete() in source:/trunk/bcfg2/src/lib/Server/Plugins/Packages.py appears to be the method that takes care of this. It has a for loop that iterates through the different sources and runs resolve_requirement(). The for loop gets broken if it finds anything definitive in that source. Since it iterates through the sources in reverse order, it breaks out after finding xfce4-notifyd as the only provider in ubuntu-updates and never sees that the ubuntu source has other providers.
So, Packages.complete()needs to look at the union of the results from all relevant source when resolving requirements. I tried doing this in Packages.complete(), but I was unsuccessful.
Here is some output from bcfg2-info debug(with ipython ;)):
In [9739eeeb3d550e084a5de24062f440794c34a954] (SVN r6): s.get_provides(m, "notification-daemon") Out[9739eeeb3d550e084a5de24062f440794c34a954] (SVN r6): set(['notify-osd', 'xfce4-notifyd', 'colibri']) In [0ff3183d7140cca9363bd9e1de79ccf4f01d2b63] (SVN r7): m = self.build_metadata('shoryuken.ma.utexas.edu') In [7bfe1a9425bdb1e3e515eee1f303fefbeed754c9] (SVN r8): for source in self.plugins['Packages'].get_matching_sources(m): ...: try: ...: source.get_provides(m, "notification-daemon") ...: except: ...: pass ...: Out[7bfe1a9425bdb1e3e515eee1f303fefbeed754c9] (SVN r8): set(['notify-osd', 'xfce4-notifyd', 'colibri']) Out[7bfe1a9425bdb1e3e515eee1f303fefbeed754c9] (SVN r8): set(['xfce4-notifyd']) Out[7bfe1a9425bdb1e3e515eee1f303fefbeed754c9] (SVN r8): set(['notify-osd', 'xfce4-notifyd', 'colibri']) Out[7bfe1a9425bdb1e3e515eee1f303fefbeed754c9] (SVN r8): set(['xfce4-notifyd'])
Attachments
Change History
comment:1 Changed 13 years ago by https://www.google.com/accounts/o8/id?id=AItOawl5-bwrxN_3riwrFWHgfESsuK8Bn6HsQ2M
- Component changed from bcfg2-client to bcfg2-server
I forgot to set the component.