Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 199805 - app-portage/gentoolkit-dev echangelog git support broken (patch attached)
Summary: app-portage/gentoolkit-dev echangelog git support broken (patch attached)
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
: 245290 (view as bug list)
Depends on:
Blocks: 268725
  Show dependency tree
 
Reported: 2007-11-20 17:56 UTC by Wulf Krueger (RETIRED)
Modified: 2009-06-19 21:21 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
echangelog-git.patch (echangelog-git.patch,3.70 KB, patch)
2007-11-20 17:56 UTC, Wulf Krueger (RETIRED)
Details | Diff
Change the check for /usr/bin/git to be more strict (echangelog-git-check.patch,382 bytes, patch)
2007-12-27 13:19 UTC, Mart Raudsepp
Details | Diff
echangelog-git1.6.patch (echangelog-git1.6.patch,472 bytes, patch)
2008-11-05 17:09 UTC, Christian Ruppert (idl0r)
Details | Diff
echangelog-ignore-git-root.patch (echangelog-git.patch,1.07 KB, patch)
2009-05-09 05:16 UTC, Christian Ruppert (idl0r)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wulf Krueger (RETIRED) gentoo-dev 2007-11-20 17:56:28 UTC
At least in <=app-portage/gentoolkit-dev-0.2.6.6 echangelog's git support is completely broken. I've created a patch which I've successfully tested with both my git overlays as well as the tree without any problems for some time now.
Comment 1 Wulf Krueger (RETIRED) gentoo-dev 2007-11-20 17:56:59 UTC
Created attachment 136508 [details, diff]
echangelog-git.patch

Here's the promised patch.
Comment 2 Paul Varner (RETIRED) gentoo-dev 2007-12-03 19:27:52 UTC
$ svn commit -m "Add patch from philantrop for git support in echangelog"
Sending        echangelog/echangelog
Transmitting file data .
Committed revision 456.

Note: I don't have any git repositories to do any independent testing of the patch
Comment 3 Mart Raudsepp gentoo-dev 2007-12-27 13:13:19 UTC
Could we get a release please for this? Need to use for my git.overlays.gentoo.org repositories...
Comment 4 Mart Raudsepp gentoo-dev 2007-12-27 13:19:58 UTC
Created attachment 139407 [details, diff]
Change the check for /usr/bin/git to be more strict

Additionally I suggest this small and simple patch to be applied as well. It makes the /usr/bin/git check use -x instead of -f, as next we try to execute it and -f just checks for plain files, but we want it to be just an executable file.
So just technically more correct and strict, see http://perldoc.perl.org/functions/-X.html
Comment 5 Ingmar Vanhassel (RETIRED) gentoo-dev 2008-01-07 17:58:03 UTC
(In reply to comment #3)
> Could we get a release please for this? Need to use for my
> git.overlays.gentoo.org repositories...
> 

Yeah, please do.
I and all other developers in the genkdesvn overlay have been testing this for months, including Leio's fix, and it works perfectly fine.
Comment 6 Daniel Gryniewicz (RETIRED) gentoo-dev 2008-01-27 15:42:27 UTC
+1 from the gnomies.
Comment 7 Paul Varner (RETIRED) gentoo-dev 2008-03-14 03:09:53 UTC
Released in gentoolkit-dev-0.2.6.7
Comment 8 Andrew Gaffney (RETIRED) gentoo-dev 2008-07-29 01:46:04 UTC
There's something horribly wrong with this patch. When I run echangelog with this patch (gentoolkit-dev-0.2.6.8), it throws up all over itself with errors about unadded files. Commenting line 140 (the one that looks for unknown files) allows it to work, although the complaints from perl about the undefined value don't go away.

Here is the output I get:

Use of uninitialized value in substr at /usr/bin/echangelog line 119.
Use of uninitialized value in substr at /usr/bin/echangelog line 119.
Use of uninitialized value in substr at /usr/bin/echangelog line 119.
Use of uninitialized value in substr at /usr/bin/echangelog line 119.
Use of uninitialized value in substr at /usr/bin/echangelog line 119.
Use of uninitialized value in substr at /usr/bin/echangelog line 119.
Use of uninitialized value in substr at /usr/bin/echangelog line 119.
Use of uninitialized value in substr at /usr/bin/echangelog line 119.
Use of uninitialized value in substr at /usr/bin/echangelog line 119.
git reports the following unknown files.  Please use "git add" before
running echangelog, or remove the files in question.
? description
? HEAD
? config
? FETCH_HEAD
? index
? ORIG_HEAD
? master
? master
? HEAD
? applypatch-msg
? commit-msg
? post-commit
? post-receive
? post-update
? pre-applypatch
? pre-commit
? pre-rebase
? prepare-commit-msg
? update
? exclude
? pack-c92f833349ef00297d424eb57be98bb3d0239d9c.pack
? pack-c92f833349ef00297d424eb57be98bb3d0239d9c.idx
? eaf5e715cadeb295c714f0ee7e25a8232e1d1d
? 34c2e81e4f4fc857e55b8a669dfa90919c8f33
<snip a bunch more of these>
? 455cacecf39e7c038daeae4dfb4a9cd89a3530
? HEAD
? master
? HEAD
? master
Comment 9 Christian Ruppert (idl0r) gentoo-dev 2008-11-05 17:09:57 UTC
Created attachment 170826 [details, diff]
echangelog-git1.6.patch

here is a small fix for git >= 1.6.
Comment 10 Christian Faulhammer (RETIRED) gentoo-dev 2008-11-05 17:50:00 UTC
*** Bug 245290 has been marked as a duplicate of this bug. ***
Comment 11 Christian Ruppert (idl0r) gentoo-dev 2008-11-05 21:41:51 UTC
well.. i've found a new bug.

git mv was ignored sometimes.

steps to reproduce:

touch test-0.0.1.ebuild
git add test-0.0.1.ebuild
echangelog "test"

--- ChangeLog   1970-01-01 01:00:00.000000000 +0100
+++ ChangeLog.new   2008-11-05 22:24:20.000000000 +0100
@@ -0,0 +1,10 @@
+# ChangeLog for foo-bar/foo
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*test-0.0.1 (05 Nov 2008)
+
+  05 Nov 2008; Christian Ruppert (idl0r) <spooky85@gmail.com>
+  +test-0.0.1.ebuild:
+  test

git mv test-0.0.1.ebuild test-0.0.2.ebuild
echangelog "test2

--- ChangeLog   2008-11-05 22:24:20.000000000 +0100
+++ ChangeLog.new   2008-11-05 22:25:01.000000000 +0100
@@ -2,6 +2,10 @@
 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  05 Nov 2008; Christian Ruppert (idl0r) <spooky85@gmail.com>
+  -test-0.0.1.ebuild, +test-0.0.2.ebuild:
+  test2
+
 *test-0.0.1 (05 Nov 2008)
 
   05 Nov 2008; Christian Ruppert (idl0r) <spooky85@gmail.com>
   
mkdir files
touch files/somepatch.patch
git add files/
git mv test-0.0.2.ebuild test-0.0.3.ebuild
echangelog "test3"

--- ChangeLog   2008-11-05 22:30:04.000000000 +0100
+++ ChangeLog.new   2008-11-05 22:31:59.000000000 +0100
@@ -3,6 +3,10 @@
 # $Header: $
 
   05 Nov 2008; Christian Ruppert (idl0r) <spooky85@gmail.com>
+  +files/somepatch.patch:
+  test3
+
+  05 Nov 2008; Christian Ruppert (idl0r) <spooky85@gmail.com>
   -test-0.0.1.ebuild, +test-0.0.2.ebuild:
   test2
Comment 12 Paul Varner (RETIRED) gentoo-dev 2009-04-29 20:53:31 UTC
gentoolkit-0.2.6.10 has been released. I will close after independent verification that the bug is fixed.
Comment 13 Andrew Gaffney (RETIRED) gentoo-dev 2009-05-09 02:11:19 UTC
The bug I mentioned in comment 8 is *not* fixed in 0.2.6.11. The code for git_unknown_objects() added in the original patch will try to run 'git status' on files in .git/ dirs, which will of course not be tracked by git. In order to use echangelog in a git checkout, if I have to comment the call to that function.
Comment 14 Christian Ruppert (idl0r) gentoo-dev 2009-05-09 05:16:21 UTC
Created attachment 190724 [details, diff]
echangelog-ignore-git-root.patch

(In reply to comment #13)
> The bug I mentioned in comment 8 is *not* fixed in 0.2.6.11. The code for
> git_unknown_objects() added in the original patch will try to run 'git status'
> on files in .git/ dirs, which will of course not be tracked by git. In order to
> use echangelog in a git checkout, if I have to comment the call to that
> function.
> 

Ok, Andrew told me that he is running echangelog directly in the repository root and thats the reason.
So i re-wrote the unknown_objects function, see patch.
Please test :)
Comment 15 Christian Ruppert (idl0r) gentoo-dev 2009-05-12 19:00:48 UTC
Comment on attachment 190724 [details, diff]
echangelog-ignore-git-root.patch

gentoolkit-dev-0.2.6.11-r2 has been released, please test.