Bug 1907964 - Fedpkg prep doesn't work with detached HEAD
Summary: Fedpkg prep doesn't work with detached HEAD
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: fedpkg
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ondřej Nosek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-15 15:26 UTC by Pavel Raiskup
Modified: 2021-09-09 17:45 UTC (History)
6 users (show)

Fixed In Version: fedpkg-1.41-1.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-09 17:45:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pavel Raiskup 2020-12-15 15:26:44 UTC
Steps to reproduce:
$ git clone mock
$ cd mock
$ git checkout 2b9e1a236af7662b431239ebeb583965a1bfcb1f
$ fedpkg prep
Downloading mock-2.7.tar.gz
######################################################################## 100.0%
Could not execute prep: Repo in inconsistent state: HEAD is a detached symbolic reference as it points to '2b9e1a236af7662b431239ebeb583965a1bfcb1f'

I don't think the branch name is needed to actually execute %prep section:
$ rpmbuild -bp *.spec --define _sourcedir\ `pwd`
setting SOURCE_DATE_EPOCH=1606694400
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.7kjfK7
+ umask 022
+ cd /home/praiskup/rpmbuild/BUILD
+ cd /home/praiskup/rpmbuild/BUILD
+ rm -rf mock-2.7
+ /usr/bin/gzip -dc /home/praiskup/rh/packages/mock/mock-2.7.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd mock-2.7
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ for file in py/mock.py py/mock-parse-buildlog.py
+ sed -i '1s|#!/usr/bin/python3 |#!/usr/bin/python3 |' py/mock.py
+ for file in py/mock.py py/mock-parse-buildlog.py
+ sed -i '1s|#!/usr/bin/python3 |#!/usr/bin/python3 |' py/mock-parse-buildlog.py
+ RPM_EC=0
++ jobs -p
+ exit 0

Comment 1 Pavel Raiskup 2020-12-15 15:27:18 UTC
s/git clone mock/fedpkg clone mock/

Comment 2 Ondřej Nosek 2021-02-08 22:25:37 UTC
Please, see (and/or) comment here:
https://pagure.io/rpkg/pull-request/536

Comment 3 Ondřej Nosek 2021-02-10 07:43:22 UTC
As per pull-request mentioned above, I think the 'prep' function needs better requirements - it means the small fix was prepared to show a better hint to the user in this situation. Marking as Pending Release for now.

Comment 4 Fedora Update System 2021-08-25 10:26:42 UTC
FEDORA-EPEL-2021-4b1bb0ee48 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-4b1bb0ee48

Comment 5 Fedora Update System 2021-08-25 10:30:01 UTC
FEDORA-2021-20e5f8a6b8 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-20e5f8a6b8

Comment 6 Fedora Update System 2021-08-25 20:50:48 UTC
FEDORA-2021-20e5f8a6b8 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-20e5f8a6b8`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-20e5f8a6b8

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

Comment 7 Fedora Update System 2021-09-01 12:48:41 UTC
FEDORA-2021-20e5f8a6b8 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-20e5f8a6b8

Comment 8 Fedora Update System 2021-09-01 20:21:07 UTC
FEDORA-2021-20e5f8a6b8 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-20e5f8a6b8`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-20e5f8a6b8

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

Comment 9 Fedora Update System 2021-09-09 17:45:10 UTC
FEDORA-2021-20e5f8a6b8 has been pushed to the Fedora 33 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.