FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 09-20-2011, 11:49 PM
Dan McGee
 
Default makepkg: output commands ran in build/check/package functions

On Tue, Sep 20, 2011 at 9:11 AM, Florian Pritz <bluewind@xinu.at> wrote:
> This might help to locate a failing command which causes makepkg to
> abort.
>
> Signed-off-by: Florian Pritz <bluewind@xinu.at>
> ---
> This is a request for comments and not a final patch. It's only been tested shortly.
> I just want to know if people like the idea.

I'm a +0 on this- mainly because I don't build enough to know whether
people would find this helpful. People that package more than I,
please speak up.

> *scripts/makepkg.sh.in | * *5 +++++
> *1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index 6304a25..409c4cc 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -851,6 +851,7 @@ extract_sources() {
> *}
>
> *error_function() {
> + * * * set +x
> * * * *if [[ -p $logpipe ]]; then
> * * * * * * * *rm "$logpipe"
> * * * *fi
> @@ -912,7 +913,9 @@ run_function() {
>
> * * * * * * * *restoretrap=$(trap -p ERR)
> * * * * * * * *trap 'error_function $pkgfunc' ERR
> + * * * * * * * set -x
> * * * * * * * *$pkgfunc &>"$logpipe"
> + * * * * * * * set +x
> * * * * * * * *eval $restoretrap
>
> * * * * * * * *wait $teepid
> @@ -920,7 +923,9 @@ run_function() {
> * * * *else
> * * * * * * * *restoretrap=$(trap -p ERR)
> * * * * * * * *trap 'error_function $pkgfunc' ERR
> + * * * * * * * set -x
> * * * * * * * *$pkgfunc 2>&1
> + * * * * * * * set +x
> * * * * * * * *eval $restoretrap
> * * * *fi
> * * * *# reset our shell options
> --
> 1.7.6.1
>
>
 
Old 09-21-2011, 03:40 AM
Allan McRae
 
Default makepkg: output commands ran in build/check/package functions

On 21/09/11 09:49, Dan McGee wrote:

On Tue, Sep 20, 2011 at 9:11 AM, Florian Pritz<bluewind@xinu.at> wrote:

This might help to locate a failing command which causes makepkg to
abort.

Signed-off-by: Florian Pritz<bluewind@xinu.at>
---
This is a request for comments and not a final patch. It's only been tested shortly.
I just want to know if people like the idea.


I'm a +0 on this- mainly because I don't build enough to know whether
people would find this helpful. People that package more than I,
please speak up.



I'm also +0, but that might be because I am quite familiar with the
packaging process and find where errors occur somewhat obvious.


So... waiting to hear from people who package more than Dan but less
than me!


Allan
 
Old 09-21-2011, 05:40 AM
Eric Bélanger
 
Default makepkg: output commands ran in build/check/package functions

On Tue, Sep 20, 2011 at 11:40 PM, Allan McRae <allan@archlinux.org> wrote:
> On 21/09/11 09:49, Dan McGee wrote:
>>
>> On Tue, Sep 20, 2011 at 9:11 AM, Florian Pritz<bluewind@xinu.at> *wrote:
>>>
>>> This might help to locate a failing command which causes makepkg to
>>> abort.
>>>
>>> Signed-off-by: Florian Pritz<bluewind@xinu.at>
>>> ---
>>> This is a request for comments and not a final patch. It's only been
>>> tested shortly.
>>> I just want to know if people like the idea.
>>
>> I'm a +0 on this- mainly because I don't build enough to know whether
>> people would find this helpful. People that package more than I,
>> please speak up.
>>
>
> I'm also +0, but that might be because I am quite familiar with the
> packaging process and find where errors occur somewhat obvious.
>

Same here. For the few cases where it's not obvious, it's quite easy
to pin-point the problematic line with some echo or 'return 1'
statement.


> So... waiting to hear from people who package more than Dan but less than
> me!
>
> Allan
>
>
 
Old 09-21-2011, 11:14 AM
Lukas Fleischer
 
Default makepkg: output commands ran in build/check/package functions

On Wed, Sep 21, 2011 at 01:40:41AM -0400, Eric Bélanger wrote:
> On Tue, Sep 20, 2011 at 11:40 PM, Allan McRae <allan@archlinux.org> wrote:
> > On 21/09/11 09:49, Dan McGee wrote:
> >>
> >> On Tue, Sep 20, 2011 at 9:11 AM, Florian Pritz<bluewind@xinu.at> *wrote:
> >>>
> >>> This might help to locate a failing command which causes makepkg to
> >>> abort.
> >>>
> >>> Signed-off-by: Florian Pritz<bluewind@xinu.at>
> >>> ---
> >>> This is a request for comments and not a final patch. It's only been
> >>> tested shortly.
> >>> I just want to know if people like the idea.
> >>
> >> I'm a +0 on this- mainly because I don't build enough to know whether
> >> people would find this helpful. People that package more than I,
> >> please speak up.
> >>
> >
> > I'm also +0, but that might be because I am quite familiar with the
> > packaging process and find where errors occur somewhat obvious.
> >
>
> Same here. For the few cases where it's not obvious, it's quite easy
> to pin-point the problematic line with some echo or 'return 1'
> statement.

And same here. I actually never really had the problem of not knowing
where some build error originates from. It is kind of obvious in most
cases and the error messages are often helpful enough. In case of doubt,
you can always add "set -x" to the build() and package() functions
manually as well.
 

Thread Tools




All times are GMT. The time now is 09:15 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org