Bug 2096624 - A failed spectool -g does not return a non-zero exit code
Summary: A failed spectool -g does not return a non-zero exit code
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmdevtools
Version: 39
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-14 08:26 UTC by Petr Pisar
Modified: 2023-11-23 09:34 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2022-06-14 08:26:44 UTC
If spectool cannot download sources, it prints an error, but does return a non-zero exit code.

Here I injected a nonexistant version "0.X22":

$ spectool -g perl-XS-Parse-Keyword.spec 
Downloading: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/XS-Parse-Keyword-0.X22.tar.gz
Download failed:
404 Client Error: Not Found for url: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/XS-Parse-Keyword-0.X22.tar.gz
-   0.0 B Elapsed Time: 0:00:00                                                                       
$ echo $?
0

Tested with rpmdevtools-9.6-1.fc35.noarch.

Comment 1 Petr Pisar 2022-06-14 08:28:42 UTC
s/does return/does NOT return/

Comment 2 Fabio Valentini 2022-06-15 20:19:52 UTC
As we include upstream spectool without modifications, can you please file this bug with the upstream project? https://pagure.io/rpmdevtools

Comment 3 Petr Pisar 2022-06-16 11:11:11 UTC
I cannot. Fedora IDP does recongize my Kerberos ticket.

Comment 4 Petr Pisar 2022-06-16 11:11:54 UTC
Fedora IDP does not recongize my Kerberos ticket.

Comment 5 Fabio Valentini 2022-07-05 15:28:57 UTC
Okay, I found the problem, and I've submitted a PR to fix it:
https://pagure.io/rpmdevtools/pull-request/95

Do you think spectool should abort after the first failed download?
Or should it try all files first, and just return with a non-zero exit code if any of them failed?

Comment 6 Petr Pisar 2022-07-07 07:25:44 UTC
I think it should exit at a first error without trying other sources.

Comment 7 Ben Cotton 2022-11-29 18:57:18 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 8 Petr Pisar 2022-11-30 09:43:21 UTC
This is still an issue in rpmdevtools-9.6-2.fc38.noarch.

Comment 9 Ben Cotton 2023-04-25 18:24:42 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 10 Petr Pisar 2023-04-26 08:48:18 UTC
Still not fixed in rpmdevtools-9.6-3.fc38.noarch.

Comment 11 Aoife Moloney 2023-11-23 00:13:16 UTC
This message is a reminder that Fedora Linux 37 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 37 on 2023-12-05.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '37'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 37 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 12 Petr Pisar 2023-11-23 09:34:33 UTC
Still broken in rpmdevtools-9.6-4.fc39.


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