Ticket #920 (closed defect: fixed)

Opened 13 years ago

Last modified 13 years ago

Package provides are resolved incorrectly with multiple apt sources

Reported by: Owned by: desai
Priority: major Milestone: Bcfg2 1.1.0 Release
Component: bcfg2-server Version: 1.0
Keywords: Cc:


version: 1.0.1-1~ppa2~hardy2 with 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/ 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('')

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'])


Change History

comment:1 Changed 13 years ago by

  • Component changed from bcfg2-client to bcfg2-server

I forgot to set the component.

comment:2 Changed 13 years ago by desai

  • Status changed from new to closed
  • Resolution set to fixed

This issue is fixed in the version of Packages included in 1.1.0rc5.

comment:3 Changed 13 years ago by solj

  • Milestone changed from Bcfg2 1.2.0 Release to Bcfg2 1.1.0 Release

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.