Bug 619935 - fedpkg breaks if you forget to push and do a switch-branch
Summary: fedpkg breaks if you forget to push and do a switch-branch
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-packager (Show other bugs)
(Show other bugs)
Version: 12
Hardware: All Linux
low
medium
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-30 22:32 UTC by Sandro Mathys
Modified: 2013-01-10 06:06 UTC (History)
3 users (show)

Fixed In Version: fedora-packager-0.5.1.2-2.fc14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-17 05:36:37 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Sandro Mathys 2010-07-30 22:32:46 UTC
Description of problem:
If you merge master to f14 but do NO push and then switch-branch to f13 you break fedpkg.


Version-Release number of selected component (if applicable):
fedora-packager-0.5.1.0-1.fc12.noarch

How reproducible:
Always

Steps to Reproduce:
1. Have a newer master than f14
2. Merge master into f14
3. switch-branch f13 (no push in f14 before you switch!)
4. switch-branch -l or switch-branch f14
5. you got an error
  
Actual results:
Could not init the module

Expected results:
Branch f14 set up to track remote branch f14/master from origin.

Additional info:
So here's what I did one by one. Jesse helped to make sure it's not a git bug.

[packager@nebuchadnezzar git]$ fedpkg clone R-timeDate
Cloning into R-timeDate...
remote: Counting objects: 8, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 8 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (8/8), done.

[packager@nebuchadnezzar git]$ cd R-timeDate/

[packager@nebuchadnezzar R-timeDate]$ ls
R-timeDate.spec  sources

[packager@nebuchadnezzar R-timeDate]$ fedpkg switch-branch f14
Branch f14 set up to track remote branch f14/master from origin.

[packager@nebuchadnezzar R-timeDate]$ git merge master
Updating 67deed1..781fff7
Fast-forward
 .gitignore      |    1 +
 R-timeDate.spec |   73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources         |    1 +
 3 files changed, 75 insertions(+), 0 deletions(-)
 create mode 100644 R-timeDate.spec

[packager@nebuchadnezzar R-timeDate]$ ls
R-timeDate.spec  sources

# NO PUSH DONE HERE

[packager@nebuchadnezzar R-timeDate]$ fedpkg switch-branch f13
Branch f13 set up to track remote branch f13/master from origin.

[packager@nebuchadnezzar R-timeDate]$ ls
sources

[packager@nebuchadnezzar R-timeDate]$ fedpkg switch-branch f14
Could not init the module

[packager@nebuchadnezzar R-timeDate]$ fedpkg switch-branch -l
Could not init the module

[packager@nebuchadnezzar R-timeDate]$ git checkout f14
Switched to branch 'f14'
Your branch is ahead of 'origin/f14/master' by 1 commit.

[packager@nebuchadnezzar R-timeDate]$ ls
R-timeDate.spec  sources

[packager@nebuchadnezzar R-timeDate]$ fedpkg switch-branch -l
Locals:
  f13
  f14
  master
Remotes:
  origin/f13/master
  origin/f14/master
  origin/master

Comment 1 Jesse Keating 2010-07-30 22:37:01 UTC
I'll take this.  We're likely getting an "error" return from git checkout, even though it isn't an error.  *sigh*

Comment 2 Levente Farkas 2010-08-07 23:05:27 UTC
the same happened with me and as i'm not a git expert i can't solve the error:-(

Comment 3 Jesse Keating 2010-08-12 06:35:54 UTC
I misread what was going on.  The core problem here is that you were trying to switch-branch away from a branch that didn't have any spec file in it, and at the time, fedpkg switch-branch depended on being able to "init the module" by reading the spec file and setting various data points.  This error message is very confusing, however I believe that in newer versions of fedpkg this error wouldn't happen.

Comment 4 Fedora Update System 2010-08-12 19:52:58 UTC
python-kitchen-0.2-0.1.a2.el5,fedora-packager-0.5.1.2-1.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/python-kitchen-0.2-0.1.a2.el5,fedora-packager-0.5.1.2-1.el5

Comment 5 Fedora Update System 2010-08-12 19:56:38 UTC
fedora-packager-0.5.1.2-1.fc14 has been submitted as an update for Fedora 14.
http://admin.fedoraproject.org/updates/fedora-packager-0.5.1.2-1.fc14

Comment 6 Fedora Update System 2010-08-12 20:01:07 UTC
fedora-packager-0.5.1.2-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/fedora-packager-0.5.1.2-1.fc13

Comment 7 Fedora Update System 2010-08-12 20:06:59 UTC
fedora-packager-0.5.1.2-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/fedora-packager-0.5.1.2-1.fc12

Comment 8 Fedora Update System 2010-08-13 21:05:59 UTC
fedora-packager-0.5.1.2-2.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update fedora-packager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/fedora-packager-0.5.1.2-2.fc13

Comment 9 Fedora Update System 2010-08-13 22:38:35 UTC
fedora-packager-0.5.1.2-2.el5, python-kitchen-0.2-0.1.a2.el5 has been pushed to the Fedora EPEL 5 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update fedora-packager python-kitchen'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/python-kitchen-0.2-0.1.a2.el5,fedora-packager-0.5.1.2-2.el5

Comment 10 Levente Farkas 2010-08-14 13:30:20 UTC
i still have problems! let's see a simple action. i've the right thing in the master so now i'd like to megre it to all branches:
----------------------------------
[lfarkas@eagle fedora]$ fedpkg clone gstreamer-java
Cloning into gstreamer-java...
remote: Counting objects: 275, done.
remote: Compressing objects: 100% (139/139), done.
remote: Total 275 (delta 131), reused 255 (delta 123)
Receiving objects: 100% (275/275), 34.95 KiB, done.
Resolving deltas: 100% (131/131), done.
[lfarkas@eagle fedora]$ cd gstreamer-java
[lfarkas@eagle gstreamer-java (master)]$ fedpkg switch-branch f14
Branch f14 set up to track remote branch f14/master from origin.
[lfarkas@eagle gstreamer-java (f14)]$ git merge master
Updating b610410..bbbdda3
Fast-forward
 .gitignore                   |    1 +
 gstreamer-java-caps.patch    |   10 +++++
 gstreamer-java-factory.patch |   82 ++++++++++++++++++++++++++++++++++++++++++
 gstreamer-java-format.patch  |   57 +++++++++++++++++++++++++++++
 gstreamer-java.spec          |   56 ++++++++++++++++++++--------
 sources                      |    2 +-
 6 files changed, 191 insertions(+), 17 deletions(-)
 create mode 100644 gstreamer-java-caps.patch
 create mode 100644 gstreamer-java-factory.patch
 create mode 100644 gstreamer-java-format.patch
----------------------------------

from now on nothing is working:
----------------------------------
[lfarkas@eagle gstreamer-java (f14)]$ fedpkg commit -p
# On branch f14
# Your branch is ahead of 'origin/f14/master' by 40 commits.
#
nothing to commit (working directory clean)
Could not commit: Command '['git', 'commit', '-a']' returned non-zero exit status 1
[lfarkas@eagle gstreamer-java (f14)]$ fedpkg commit
# On branch f14
# Your branch is ahead of 'origin/f14/master' by 40 commits.
#
nothing to commit (working directory clean)
Could not commit: Command '['git', 'commit', '-a']' returned non-zero exit status 1
[lfarkas@eagle gstreamer-java (f14)]$ git push
Everything up-to-date
[lfarkas@eagle gstreamer-java (f14)]$ fedpkg build
Could not initiate build: There are unpushed changes in your repo
----------------------------------
so what can i do now?

Comment 11 Dennis Gilmore 2010-08-14 15:42:42 UTC
have you done the step at the top of 

http://fedoraproject.org/wiki/Using_Fedora_GIT

Comment 12 Levente Farkas 2010-08-14 16:25:54 UTC
yes.
and have you try my commands?
you can do it on the real repo (afaik you're a provenpackager) as i'm the package owner of gstreamer-java you can test it with:
---------------------------
fedpkg clone gstreamer-java
cd gstreamer-java
fedpkg switch-branch f14
git merge master
fedpkg commit -p
---------------------------

Comment 13 Levente Farkas 2010-08-14 17:37:40 UTC
how can you build it in f14? 
i only got:
---------------------------
[lfarkas@eagle gstreamer-java (f14)]$ fedpkg build
Could not initiate build: There are unpushed changes in your repo
---------------------------
more strange that the remote seems to contains may commit?:
http://pkgs.fedoraproject.org/gitweb/?p=gstreamer-java.git;a=shortlog;h=refs/heads/f14/master
but not in f13. so you can still test it with f13 branch.

Comment 14 Dennis Gilmore 2010-08-14 20:09:38 UTC
[dennis@pegasus fedora]$ cd gstreamer-java
[dennis@pegasus gstreamer-java (master)]$ fedpkg switch-branch f14
Branch f14 set up to track remote branch f14/master from origin.
[dennis@pegasus gstreamer-java (f14)]$ git merge master
Updating b610410..bbbdda3
Fast-forward
 .gitignore                   |    1 +
 gstreamer-java-caps.patch    |   10 +++++
 gstreamer-java-factory.patch |   82 ++++++++++++++++++++++++++++++++++++++++++
 gstreamer-java-format.patch  |   57 +++++++++++++++++++++++++++++
 gstreamer-java.spec          |   56 ++++++++++++++++++++--------
 sources                      |    2 +-
 6 files changed, 191 insertions(+), 17 deletions(-)
 create mode 100644 gstreamer-java-caps.patch
 create mode 100644 gstreamer-java-factory.patch
 create mode 100644 gstreamer-java-format.patch
[dennis@pegasus gstreamer-java (f14)]$ fedpkg commit -p
# On branch f14
# Your branch is ahead of 'origin/f14/master' by 40 commits.
#
nothing to commit (working directory clean)
Could not commit: Command '['git', 'commit', '-a']' returned non-zero exit status 1
[dennis@pegasus gstreamer-java (f14)]$ git push
Total 0 (delta 0), reused 0 (delta 0)
To ssh://ausil@pkgs.fedoraproject.org/gstreamer-java
   b610410..bbbdda3  f14 -> f14/master
[dennis@pegasus gstreamer-java (f14)]$ fedpkg  build --nowait
Building gstreamer-java-1.4-4.fc14 for dist-f14-updates-candidate
Created task: 2401698
Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=2401698


you need to "git push" not commit.  the changes are commited. just not pushed

Comment 15 Levente Farkas 2010-08-14 20:53:45 UTC
ok it's working now. but i'm 100% sure i'm already try it also today and it was not working.
anyway now it's working thanks.

Comment 16 Fedora Update System 2010-08-17 05:35:28 UTC
fedora-packager-0.5.1.2-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2010-08-24 21:08:44 UTC
fedora-packager-0.5.1.2-2.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2010-08-24 23:03:13 UTC
fedora-packager-0.5.1.2-2.el5, python-kitchen-0.2-0.1.a2.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2010-08-25 01:18:59 UTC
fedora-packager-0.5.1.2-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, 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.