Skip Menu |
 

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 72254
Status: open
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: ovid [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.3800
Fixed in: (no value)



Subject: Missing deps should have a non-zero exit status
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 506
Download (untitled) / with headers
text/plain 506b
When I use Makefile.PL, I rely on this: perl Makefile.PL && make && make test In writing up an example for basic Module::Build usage, I did the same thing: perl Build.PL && ./Build && ./Build test However, when I tried to build Weather::Google which lists a dependency on XML::Simple, it correctly reported that XML::Simple was not installed, but it went on to run (and fail) all of the tests. ./Build should return a non-zero status to ensure that the && ./Build test does not run. Cheers, Ovid
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2603-1320693205-964.72254-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 8
I agree.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2604-1320693980-1809.72254-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 884
Download (untitled) / with headers
text/plain 884b
I think a non-zero exit status will convince CPAN clients to abort, which means they won't then attempt to resolve prerequisites. Historically, missing prereqs were advisory -- as many modules might still work with version X even when the prerequisite was listed as Y (>X). Thus, a failure due to a prerequisite would manifest during an actual test, not during Build.PL. I would be willing to see a non-zero exit *only* for Perl 5.10.1 or greater and only when we don't have the magic PERL_CPAN_IS_RUNNING (or PERL_CPANPLUS_IS_RUNNING) or whatever the actual magic environment variables are. (Off the top of my head, I think CPAN/CPANPLUS as of 5.10.1 both set the variables correctly, which is why I would set that minimum.) I don't have time to check the exact behaviors of the clients, but I hope that gives the general parameters for what a solution would involve. -- David
From schwern [...] pobox.com Mon Nov 7 14: 51:55 2011
MIME-Version: 1.0
X-Spam-Status: No, score=-6.713 tagged_above=-99.9 required=10 tests=[AWL=-0.492, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_NEUTRAL=0.779] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-2604-1320693980-1908.72254-5-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-72254 [...] rt.cpan.org> <rt-3.8.HEAD-2604-1320693980-1908.72254-5-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <4EB836D0.7010002 [...] pobox.com>
Content-Type: text/plain; charset=UTF-8
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.713
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] pobox.com
Authentication-Results: hipster.bestpractical.com (amavisd-new); domainkeys=pass header.from=schwern [...] pobox.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 3A9BD240D05 for <cpan-bug+Module-Build [...] hipster.bestpractical.com>; Mon, 7 Nov 2011 14:51:55 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6blC5mOjRwfp for <cpan-bug+Module-Build [...] hipster.bestpractical.com>; Mon, 7 Nov 2011 14:51:52 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 9FF0A240BF1 for <bug-Module-Build [...] rt.cpan.org>; Mon, 7 Nov 2011 14:51:52 -0500 (EST)
Received: (qmail 25096 invoked by uid 103); 7 Nov 2011 19:51:52 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 7 Nov 2011 19:51:52 -0000
Received: from b-pb-sasl-quonix.pobox.com (HELO smtp.pobox.com) (208.72.237.35) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Mon, 07 Nov 2011 11:51:49 -0800
Received: from smtp.pobox.com (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id E329661BC for <bug-Module-Build [...] rt.cpan.org>; Mon, 7 Nov 2011 14:51:46 -0500 (EST)
Received: from b-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id DAFDD61BB for <bug-Module-Build [...] rt.cpan.org>; Mon, 7 Nov 2011 14:51:46 -0500 (EST)
Received: from [10.23.42.10] (unknown [97.120.54.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by b-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 49D4861B9 for <bug-Module-Build [...] rt.cpan.org>; Mon, 7 Nov 2011 14:51:46 -0500 (EST)
Delivered-To: cpan-bug+Module-Build [...] hipster.bestpractical.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
Subject: Re: [rt.cpan.org #72254] Missing deps should have a non-zero exit status
Domainkey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=message-id:date :from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sasl; b=WMYApI DNKnbKHrZomYB6pldJoIA45dTyaY8oZ7rJPGQlwOI87Q8FdsKGfL7fU2pwiJxr5Q 7spfWKZEwZPNI6BIO7Ys1MjFinzcPVsPrqW6B32MiTh/nlQxw+N0Y2GuBsLAX676 mo/C1q/F79onmQq10bFviwQiFeJUwG3HiDw24=
Return-Path: <schwern [...] pobox.com>
Dkim-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=message-id :date:from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sasl; bh=0xAHNGfwL9nB 9+g/YRqx07w5aaQ=; b=S+1INdylaxVT/9hSjsyrQHoLrbcJ6iGA2/MT2YfU08v3 aixDkJzBfVxg7dGm5bhO3sOhNtdUwEYDKEaDzgfWTlaJ5a0rnknxwp+3RIEuIZKP 9BFinnqborgOXsJ+wyLdbvQu0PjmlxCwRXpTPXrxiuJfm1LXZnGMZwQ/93XUorU=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+Module-Build [...] hipster.bestpractical.com
X-RT-Mail-Extension: module-build
Date: Mon, 07 Nov 2011 11:51:44 -0800
X-Spam-Level:
To: bug-Module-Build [...] rt.cpan.org
X-Enigmail-Version: 1.3.2
Content-Transfer-Encoding: 7bit
X-Pobox-Relay-ID: ECADAAB4-0979-11E1-86C8-9DB42E706CDE-02258300!b-pb-sasl-quonix.pobox.com
From: Michael G Schwern <schwern [...] pobox.com>
RT-Message-ID: <rt-3.8.HEAD-2597-1320695516-135.72254-0-0 [...] rt.cpan.org>
Content-Length: 357
Download (untitled) / with headers
text/plain 357b
Sorry, my +1 was hasty. This doesn't work and AFAIK never did: perl Makefile.PL && make && make test The Makefile.PL does not exit with non-zero on prereq failure nor does make. It runs through to the test. In isolation it would be nice if they did exit non-zero, I agree with David that the behaviors of the CPAN clients will probably be affected.
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-2604-1320693980-1809.72254-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-2604-1320693980-1809.72254-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2597-1320712916-502.72254-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 753
Download (untitled) / with headers
text/plain 753b
On Mon Nov 07 14:26:20 2011, DAGOLDEN wrote: Show quoted text
> I think a non-zero exit status will convince CPAN clients to abort, > which means they won't then attempt to resolve prerequisites.
Well, he's suggesting to return non-zero during build, not configuration, so the CPAN client should have already installed the requirements by then. I'm not seeing a problem there. Show quoted text
> Historically, missing prereqs were advisory -- as many modules might > still work with version X even when the prerequisite was listed as Y > (>X). Thus, a failure due to a prerequisite would manifest during an > actual test, not during Build.PL.
The documentation has warned the users since 2002 (version 0.06) that it may do hard require. I'd say that's more than enough warning. Leon
From david [...] autopragmatic.com Mon Nov 7 19: 53:09 2011
MIME-Version: 1.0
X-Spam-Status: No, score=-6.997 tagged_above=-99.9 required=10 tests=[AWL=-0.097, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_HI=-5] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-2597-1320712917-1193.72254-5-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-72254 [...] rt.cpan.org> <rt-3.8.HEAD-2604-1320693980-1809.72254-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-2597-1320712917-1193.72254-5-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <CAOeq1c9A-AMM=o2b+JFCS28rjQ62k7X=YJSeJAqRb9C-HZx5iw [...] mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.997
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] autopragmatic.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 1F15D240CDA for <cpan-bug+Module-Build [...] hipster.bestpractical.com>; Mon, 7 Nov 2011 19:53:09 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZdYX-JFWihTn for <cpan-bug+Module-Build [...] hipster.bestpractical.com>; Mon, 7 Nov 2011 19:53:07 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 2BFB7240CD8 for <bug-Module-Build [...] rt.cpan.org>; Mon, 7 Nov 2011 19:53:06 -0500 (EST)
Received: (qmail 15765 invoked by uid 103); 8 Nov 2011 00:53:06 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 8 Nov 2011 00:53:06 -0000
Received: from mail-ww0-f52.google.com (HELO mail-ww0-f52.google.com) (74.125.82.52) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Mon, 07 Nov 2011 16:53:04 -0800
Received: by wwn31 with SMTP id 31so6445298wwn.21 for <bug-Module-Build [...] rt.cpan.org>; Mon, 07 Nov 2011 16:53:00 -0800 (PST)
Received: by 10.181.12.39 with SMTP id en7mr10021266wid.40.1320713580755; Mon, 07 Nov 2011 16:53:00 -0800 (PST)
Received: by 10.180.107.7 with HTTP; Mon, 7 Nov 2011 16:52:39 -0800 (PST)
Delivered-To: cpan-bug+Module-Build [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #72254] Missing deps should have a non-zero exit status
Return-Path: <david [...] autopragmatic.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autopragmatic.com; s=google; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=iXpthr1ELYIkSdgHYAakjgoLb5pAaM0ftCZLLXIt4ms=; b=BnLCS/ao4D5+K33xziVHyrQRpYluri/tXi+cuzmuDq44zZrsOIYvLpNHHk8z0/chK7 q/a3JuJAAQvP55/voTGfi1maYNgZVpx9BUszSj70GtdZpni3a0fOHikt4rQ/FNHocdSA J/tNloJLQsBHSqyQR9LbrdwA7H72E/EXTyc8k=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+Module-Build [...] hipster.bestpractical.com
X-RT-Mail-Extension: module-build
X-Google-Sender-Auth: g5jV2EPsit5yjENt4zueFykXbkw
Sender: david [...] autopragmatic.com
Date: Mon, 7 Nov 2011 19:52:39 -0500
X-Spam-Level:
To: bug-Module-Build [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
RT-Message-ID: <rt-3.8.HEAD-2598-1320713590-1545.72254-0-0 [...] rt.cpan.org>
Content-Length: 1084
On Mon, Nov 7, 2011 at 7:41 PM, Leon Timmermans via RT <bug-Module-Build@rt.cpan.org> wrote: Show quoted text
> Well, he's suggesting to return non-zero during build, not > configuration, so the CPAN client should have already installed the > requirements by then. I'm not seeing a problem there.
I missed that detail, but I would disagree with it. "make/Build" has nothing to do conceptually with prerequisites so I wouldn't use it for a general check of that sort. I could imagine a "hard prereqs" mode where "make/Build" fails if build_requires are missing and likewise a failure of "make test/Build test" if test_requires are missing (which begs the question of what to do with "runtime_requires", aka, plain old "requires"). Ultimately, I think that's just messy. The right place to fail is at configuration time during Makefile.PL/Build.PL and only under a flag that enables that (e.g. something like PREREQ_FATAL for EU::MM, perhaps call it "--prereq_fatal" for M::B) or else "automagically" under the rules I laid out where it is safe to do so without screwing up CPAN clients. -- David


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.