Bug 1691553 - Unhelpful traceback if .copr/Makefile fails
Summary: Unhelpful traceback if .copr/Makefile fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Copr
Classification: Community
Component: backend
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Copr Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-21 21:29 UTC by Alois Mahdal
Modified: 2020-12-11 15:31 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-11 15:31:27 UTC
Embargoed:


Attachments (Terms of Use)

Description Alois Mahdal 2019-03-21 21:29:33 UTC
Description of problem
======================

If I enable auto package building via .copr/Makefile but the code in Makefile fails, I get
this traceback:

    ERROR: Command failed:
     # /bin/sh -c cd /mnt/tmp/tmphcd3nhc0/some-project; make -f /mnt/tmp/tmphcd3nhc0/some-project/.copr/Makefile srpm outdir="/mnt/var/lib/copr-rpmbuild/results294_fnqx" spec="/mnt/tmp/tmphcd3nhc0/some-project"


    Traceback (most recent call last):
      File "/usr/bin/copr-rpmbuild", line 154, in main
        action(args, config)
      File "/usr/bin/copr-rpmbuild", line 242, in build_srpm
        produce_srpm(task, config, resultdir)
      File "/usr/bin/copr-rpmbuild", line 182, in produce_srpm
        provider.produce_srpm()
      File "/usr/lib/python3.6/site-packages/copr_rpmbuild/providers/scm.py", line 127, in produce_srpm
        return run_cmd(cmd, cwd=self.repo_subpath)
      File "/usr/lib/python3.6/site-packages/copr_rpmbuild/helpers.py", line 73, in run_cmd
        raise RuntimeError(result.stderr)
    RuntimeError: INFO: mock.py version 1.4.13 starting (python version = 3.6.8)...

    Start: init plugins



Version-Release number of selected component
============================================

(unknown)


How reproducible
================

Always when Makefile fails


Steps to Reproduce
==================

 1. Create .copr/Makefile with `srpm` target that fails in your project
 2. Push it
 3. Configure Package Default Build Source to SCM/make srpm
 4. Rebuild package
 5. Wait until it fails, observing builder-live.log


Actual results
==============

Traceback that is not very useful


Expected results
================

Traceback or error that shows what the problem is


Additional info
===============

The issue was actually reproduced in Red Hat Internal Copr.

Comment 1 Pavel Raiskup 2019-04-02 07:30:56 UTC
Related issue: https://pagure.io/copr/copr/issue/534

Comment 2 Pavel Raiskup 2020-12-11 15:31:27 UTC
I tested now, and the current version of copr seems to print
stdout/stderr and executed commands by make:
http://coprbe.devel.redhat.com/results/praiskup/test-ca-trust/srpm-builds/00061140/builder-live.log.gz

I believe this is fixed.


Note You need to log in before you can comment on or make changes to this bug.