Bug 2308453 - rpmautospec crashes if there's already a change to a spec file
Summary: rpmautospec crashes if there's already a change to a spec file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-rpmautospec
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nils Philippsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-08-29 10:53 UTC by Peter Robinson
Modified: 2024-09-15 02:27 UTC (History)
6 users (show)

Fixed In Version: python-rpmautospec-0.7.2-1.el9 python-rpmautospec-0.7.2-1.fc40 python-rpmautospec-0.7.2-1.fc41 python-rpmautospec-0.7.2-1.fc39
Clone Of:
Environment:
Last Closed: 2024-09-09 00:56:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github fedora-infra rpmautospec issues 172 0 None open Don’t crash attempting to convert a spec file with uncommitted changes 2024-08-30 08:32:43 UTC

Description Peter Robinson 2024-08-29 10:53:53 UTC
Looking at moving to rpmautospec as part of a package bump I ran "rpmautospec convert libell.spec" when I'd already locally bumped the spec to the new version and it crashed rather than erroring out with an appropriate errors something along the lines of "please don't have uncommitted package changes when running rpmautospec"


$ rpmautospec convert libell.spec 
Traceback (most recent call last):
  File "/usr/bin/rpmautospec", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/rpmautospec/util.py", line 36, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/rpmautospec/subcommands/convert.py", line 262, in convert
    pkg = PkgConverter(spec_or_path)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/rpmautospec/subcommands/convert.py", line 73, in __init__
    raise FileModifiedError(f"Spec file '{self.specfile}' is modified")
rpmautospec.subcommands.convert.FileModifiedError: Spec file '/home/perobins/fedora/packages/libell/libell.spec' is modified

version: rpmautospec-0.7.1-1.fc40.noarch

Reproducible: Always

Comment 1 Fedora Update System 2024-08-30 13:23:40 UTC
FEDORA-2024-381466b0d6 (python-rpmautospec-0.7.2-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-381466b0d6

Comment 2 Fedora Update System 2024-08-30 13:26:20 UTC
FEDORA-2024-376b560f1d (python-rpmautospec-0.7.2-1.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-376b560f1d

Comment 3 Fedora Update System 2024-08-30 13:29:00 UTC
FEDORA-2024-09473f18a2 (python-rpmautospec-0.7.2-1.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-09473f18a2

Comment 4 Fedora Update System 2024-08-30 13:31:40 UTC
FEDORA-EPEL-2024-f75632c594 (python-rpmautospec-0.7.2-1.el9) has been submitted as an update to Fedora EPEL 9.
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-f75632c594

Comment 5 Fedora Admin user for bugzilla script actions 2024-08-30 14:02:40 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 6 Fedora Update System 2024-08-31 02:13:40 UTC
FEDORA-2024-376b560f1d has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-376b560f1d`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-376b560f1d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2024-08-31 02:55:24 UTC
FEDORA-2024-09473f18a2 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-09473f18a2`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-09473f18a2

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2024-08-31 03:17:39 UTC
FEDORA-EPEL-2024-f75632c594 has been pushed to the Fedora EPEL 9 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-f75632c594

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2024-08-31 03:38:21 UTC
FEDORA-2024-381466b0d6 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-381466b0d6`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-381466b0d6

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2024-09-09 00:56:16 UTC
FEDORA-EPEL-2024-f75632c594 (python-rpmautospec-0.7.2-1.el9) has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2024-09-09 01:17:52 UTC
FEDORA-2024-376b560f1d (python-rpmautospec-0.7.2-1.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2024-09-13 20:46:16 UTC
FEDORA-2024-381466b0d6 (python-rpmautospec-0.7.2-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2024-09-15 02:27:05 UTC
FEDORA-2024-09473f18a2 (python-rpmautospec-0.7.2-1.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.


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