[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug #602865: please unblock php-net-smtp 1.4.2-2

On Thu, 2010-11-18 at 12:18 +0800, Thomas Goirand wrote:
> On 11/18/2010 05:28 AM, Adam D. Barratt wrote:
> > On Wed, 2010-11-17 at 15:55 +0800, Thomas Goirand wrote:
> >> * Added a Conflicts: php-pear (<< 5.3), and now depends on php-pear (>=
> >> 5.3) because otherwise upgrading path from Lenny is borken (Closes:
> >> #602865).
> > [...]
> >> -Depends: php-pear, php-net-socket (>= 1.0.7), ${misc:Depends}
> >> +Depends: php-pear (>= 5.3), php-net-socket (>= 1.0.7), ${misc:Depends}
> >> +Breaks: php-pear (<< 5.3)
> > 
> > Aside from s/Conflicts/Breaks/ in the changelog, why both a versioned
> > dependency and a versioned breaks?  The dependency will already ensure
> > that an appropriate version of php-pear is installed.
> As for this issue, I really think a Conflicts: is needed, as there will
> be an issue if php-pear is installed.

I've spent a while this afternoon playing with this and come to the
conclusion that there isn't a nice answer.

With just the versioned dependency, "apt-get install php-net-smtp" does
the right thing, processing php-pear before php-net-smtp during both the
unpack and install phases, and the install works without an issue.  

Using dpkg directly, unpacking php-net-smtp by hand first fails, but it
also does so in situations where the Breaks or Conflicts is present.
Adding a Replaces may or may not succeed depending on which package is
unpacked first.

fwiw, any other package shipping files in /usr/share/php/doc is going to
have this issue.  The problem is that /usr/share/php/doc in lenny is a
dangling symlink - if one manually creates the target and installs
squeeze's php-net-smtp, everything works fine; the versioned dependency
works because it forces an upgrade to a version fixing the bug in

> The Conflicts: statement will make
> sure that php-pear >= 5.3 is installed before php-net-smtp 1.4.2, which
> is the current issue, while just adding a Depends: will not (there's
> nowhere a document in Debian that tells there is an order in the way
> things are installed if you use a Depends, is it?).

That depends on your definition of "installed".  Policy states that a
package's dependencies will all have been configured before the package
itself is configured, but the problem in this case is at unpack time.



Reply to: