tags 483338 + fixed-upstream pending
thanks

Lucas Nussbaum <[EMAIL PROTECTED]> writes:

> tags 483338 + patch
> thanks
>
> On 28/05/08 at 14:43 +0200, Lucas Nussbaum wrote:
>> Package: sbuild
>> Version: 0.57.3-1
>> 
>> Hi,
>> 
>> With the sbuild version from git master, versioned build-conflicts on
>> provided packages cause builds to abort.
>> 
>> This should probably be special-cased.
>> 
>> Example packages:
>> came:
>> dpkg - warning: ignoring request to remove linux-kernel-headers which isn't 
>> installed.
>> Checking correctness of source dependencies...
>> After installing, the following source dependencies are still unsatisfied:
>> linux-kernel-headers(inst ~*=PROVIDED=*= << conflicted 2.5.999-test7-bk-10)
>> Source-dependencies not satisfied; skipping came
>> 
>> dovecot:
>> dpkg - warning: ignoring request to remove linux-kernel-headers which isn't 
>> installed.
>> Checking correctness of source dependencies...
>> After installing, the following source dependencies are still unsatisfied:
>> linux-kernel-headers(inst ~*=PROVIDED=*= <= conflicted 2.5.999-test7-bk-17)
>> Source-dependencies not satisfied; skipping dovecot
>> 
>> mysql-gui-tools:
>> Checking correctness of source dependencies...
>> After installing, the following source dependencies are still unsatisfied:
>> libmysqlclient-dev(inst ~*=PROVIDED=*= << conflicted 4.1)
>> Source-dependencies not satisfied; skipping mysql-gui-tools
>> 
>> t38modem:
>> dpkg - warning: ignoring request to remove linux-kernel-headers which
>> isn't installed.
>> Checking correctness of source dependencies...
>> After installing, the following source dependencies are still
>> unsatisfied:
>> linux-kernel-headers(inst ~*=PROVIDED=*= << conflicted
>> 2.5.999-test7-bk-14)
>> Source-dependencies not satisfied; skipping t38modem
>> 
>> transfig:
>> Checking correctness of source dependencies...
>> After installing, the following source dependencies are still
>> unsatisfied:
>> gs-esp(inst ~*=PROVIDED=*= << conflicted 8.50)
>> Source-dependencies not satisfied; skipping transfig
>
> Hi,
>
> Here is a patch for this issue:
>
> diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm
> index 792d4c4..64127bf 100644
> --- a/lib/Sbuild/Build.pm
> +++ b/lib/Sbuild/Build.pm
> @@ -1310,6 +1310,10 @@ sub check_dependencies (\$\@) {
>                 if (!$dep->{'Rel'}) {
>                     $fail .= "$name(still installed) ";
>                 }
> +               elsif ($stat->{'Version'} == '~*=PROVIDED=*=') {
> +                   # It's a versioned build-conflict, but we installed
> +                   # a package that provides the conflicted package. It's ok.
> +               }
>                 elsif (version_compare($stat->{'Version'}, $dep->{'Rel'},
>                                        $dep->{'Version'})) {
>                     $fail .= "$name(inst $stat->{'Version'} $dep->{'Rel'} ".

Thanks.  I've applied this to the master and sbuild-lenny branches.
However, there's an annoying warning (probably already existing, but
I'd like to squash it):

Argument "~*=PROVIDED=*=" isn't numeric in numeric eq (==) at 
lib/Sbuild/Build.pm line 1310.

Is a numeric comparison approprate here, or should we just check that
"$dep->{'Rel'}" both exists and is not an empty string??


        if ($dep->{'Neg'}) {
            if ($stat->{'Installed'}) {
1310            if (!$dep->{'Rel'}) {
                    $fail .= "$name(still installed) ";
                }
                elsif ($stat->{'Version'} == '~*=PROVIDED=*=') {
                    # It's a versioned build-conflict, but we installed
                    # a package that provides the conflicted package. It's ok.
                }
                elsif (version_compare($stat->{'Version'}, $dep->{'Rel'},
                                       $dep->{'Version'})) {
                    $fail .= "$name(inst $stat->{'Version'} $dep->{'Rel'} ".
                        "conflicted $dep->{'Version'})\n";
                }
            }
        }


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Attachment: pgpAC9eL8vqaS.pgp
Description: PGP signature

Reply via email to