On Tue, 2004-11-30 at 10:34 +0000, Adam D. Barratt wrote: > On Tue, 2004-11-30 at 01:59 -0800, Scott Ritchie wrote: > > My package is a rather unusual change, so it wouldn't surprise me if > > I've uncovered a few bugs in apt-get. I know for certain I've found at > > least one. > > Not that haven't already been reported, afaics. > > > This doesn't make any sense, since the package replaces libwine-twain as > > well. dpkg should be removing them both. > > It looks like dpkg is parsing the Replaces/Conflicts headers in the > order in which they're written. Does it work if you move libwine-twain > before libwine in those headers? > > If not, turn on dpkg's debugging features and examine the output. >
Moving things around is only a partial workaround. dpkg still gets hopelessly confused trying to remove libwine, as the old wine package depended on it (but the new one replaces it). Here's what I get after moving libwine to the end of the list: $ dpkg -i --dry-run wine_0.0.20041019-1_i386.deb dpkg: considering removing wine-doc in favour of wine ... dpkg: yes, will remove wine-doc in favour of wine. dpkg: considering removing wine-utils in favour of wine ... dpkg: yes, will remove wine-utils in favour of wine. dpkg: considering removing libwine-alsa in favour of wine ... dpkg: yes, will remove libwine-alsa in favour of wine. dpkg: considering removing libwine-print in favour of wine ... dpkg: yes, will remove libwine-print in favour of wine. dpkg: considering removing libwine-twain in favour of wine ... dpkg: yes, will remove libwine-twain in favour of wine. dpkg: considering removing libwine in favour of wine ... dpkg: no, cannot remove libwine (--auto-deconfigure will help): wine depends on libwine (= 0.0.20040615-1ubuntu1) libwine is to be removed. dpkg: regarding wine_0.0.20041019-1_i386.deb containing wine: wine conflicts with libwine libwine (version 0.0.20040615-1ubuntu1) is installed. dpkg: error processing wine_0.0.20041019-1_i386.deb (--install): conflicting packages - not installing wine Errors were encountered while processing: wine_0.0.20041019-1_i386.deb Is this an error in dpkg? I'm not sure how that could be a desirable feature. Strangely, apt-get install wine works, but apt-get dist-upgrade holds wine back, I suspect for the reason above. > > The second thing to notice is that when I run apt-get install wine I get > > the following: > > > > Reading Package Lists... Done > > Building Dependency Tree... Done > > Suggested packages: > > wine-utils winesetup binfmt-support > > The following packages will be REMOVED: > > libwine libwine-alsa libwine-arts libwine-dev libwine-jack libwine-nas > > libwine-print libwine-twain wine-doc winesetuptk > > The following packages will be upgraded: > > wine > > 1 upgraded, 0 newly installed, 10 to remove and 0 not upgraded. > > Need to get 13.5MB of archives. > > After unpacking 3855kB disk space will be freed. > > Do you want to continue? [Y/n] > > > > > > Two things are wrong here. For starters, the suggested packages being > > displayed are wrong - those were only suggested in the old version of > > the package, and are now obsolete (and even conflicted) by the new > > version. > > Yep, that would be > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=243943 and the bug > merged with it. (As a 30-second look at the bug page would have shown, > fwiw). > Hey, I didn't report it, only mention it in my email here. If I was going to report it I'd have looked first ;) > > The second is that, although apt is removing libwine-dev, it > > is not replacing it with wine-dev. > > That's to be expected, you appear to be misunderstanding what a > Replaces: header does. The purpose of the Replaces: is to say "if I > install wine-dev, then remove libwine-dev first". It does *not* mean > "automatically install wine-dev if libwine-dev is removed". > > In the apt-get invocation you quoted, libwine-dev is being remove due to > the fact that it depends on libwine, not for any reason associated with > the new `wine-dev' package. If you want both installed, then you either > need to `apt-get install wine wine-dev' or `apt-get install wine-dev', > which will automatically pull in wine due to the dependency. > > > So, what's the verdict: Bug in my package control file, bug in apt, bug > > in dpkg, or combination of all three? > > A known bug in apt, a probable feature of dpkg, and a bug in your > understanding, afaics. > > Hope this helps, > > Adam > > Thank you muchly, Scott Ritchie

