Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 176337 - echangelog with SVN is broken
Summary: echangelog with SVN is broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 136048
  Show dependency tree
 
Reported: 2007-04-28 10:57 UTC by Fabian Groffen
Modified: 2009-05-01 18:55 UTC (History)
5 users (show)

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


Attachments
fixes the second issue (patch,1.56 KB, patch)
2007-04-28 18:28 UTC, Stefan Schweizer (RETIRED)
Details | Diff
fixes the second issue (patch,1.57 KB, patch)
2007-04-28 20:24 UTC, Stefan Schweizer (RETIRED)
Details | Diff
Patch to fix echangelog to properly identify added ebuilds (echangelog.176337.patch,721 bytes, patch)
2008-11-07 22:20 UTC, Paul Varner (RETIRED)
Details | Diff
svn-git-workaround.patch (svn-git-workaround.patch,475 bytes, patch)
2008-12-28 12:17 UTC, Christian Ruppert (idl0r)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Groffen gentoo-dev 2007-04-28 10:57:21 UTC
I'm sorry to say so, but echangelog's svn support seems to be broken:

[tefnut:portage/sys-apps/portage] % echangelog "New snapshot, two leap jumps forward"
Can't read portage-2.1.23.6370.ebuild to update copyright year
--- ChangeLog   2007-04-14 10:49:19 +0200
+++ ChangeLog.new       2007-04-28 12:45:04 +0200
@@ -2,6 +2,10 @@
 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  28 Apr 2007; Fabian Groffen <grobian@gentoo.org>
+  -portage-2.1.23.6370.ebuild, +portage-2.1.25.6450.ebuild:
+  New snapshot, two leap jumps forward
+
 *portage-2.1.23.6400 (14 Apr 2007)
 
   14 Apr 2007; Fabian Groffen <grobian@gentoo.org>
svn: warning: 'ChangeLog' is already under version control
[tefnut:portage/sys-apps/portage] % 

As you can see, there are two issues here:
1) it doesn't add a new version header, and
2) it tries to add ChangeLog


Reproducible: Always

Steps to Reproduce:
1. emerge =gentoolkit-dev-0.2.6.5
2. use echangelog on an SVN repo
3.

Actual Results:  
crap as described above

Expected Results:  
To work like my own SVN patch.  Not as elegant as the one included maybe, but works fine.

emergeing =gentoolkit-dev-0.2.6.4 with my own patch applied (http://overlays.gentoo.org/proj/alt/browser/trunk/prefix-overlay/app-portage/gentoolkit-dev/files/gentoolkit-dev-0.2.6.1-svn-echangelog.patch)
I get for the same command (with a reverted ChangeLog) the following output:

[tefnut:portage/sys-apps/portage] % echangelog "New snapshot, two leap jumps forward"
--- ChangeLog   2007-04-28 12:54:10 +0200
+++ ChangeLog.new       2007-04-28 12:54:24 +0200
@@ -2,6 +2,12 @@
 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+*portage-2.1.25.6450 (28 Apr 2007)
+
+  28 Apr 2007; Fabian Groffen <grobian@gentoo.org>
+  -portage-2.1.23.6370.ebuild, +portage-2.1.25.6450.ebuild:
+  New snapshot, two leap jumps forward
+
 *portage-2.1.23.6400 (14 Apr 2007)
 
   14 Apr 2007; Fabian Groffen <grobian@gentoo.org>
[tefnut:portage/sys-apps/portage] %
Comment 1 Stefan Schweizer (RETIRED) gentoo-dev 2007-04-28 18:28:24 UTC
Created attachment 117567 [details, diff]
fixes the second issue

I don't understand the first issue enough. Need to debug more.
Comment 2 Stefan Schweizer (RETIRED) gentoo-dev 2007-04-28 20:24:44 UTC
Created attachment 117581 [details, diff]
fixes the second issue

small bug correction ..
Comment 3 Paul Varner (RETIRED) gentoo-dev 2007-05-11 05:19:04 UTC
$ svn commit -m "Add patch from genstef to fix issues from Bug 176337"
Sending        echangelog/echangelog
Transmitting file data .
Committed revision 400.
Comment 4 Stefan Schweizer (RETIRED) gentoo-dev 2007-05-11 11:00:43 UTC
ok, fixes the other issues:


$ svn diff .
Index: echangelog
===================================================================
--- echangelog  (Revision 401)
+++ echangelog  (Arbeitskopie)
@@ -410,6 +410,7 @@
 # copyright lines on ebuilds that haven't changed.  I verified this with an IP
 # lawyer.
 for my $e (grep /\.ebuild$/, @files) {
+  if (-s $e) {
     my ($etext, $netext);
     open E, "<$e" or warn("Can't read $e to update copyright year\n"), next;
     { local $/ = undef; $etext = <E>; }
@@ -427,6 +428,7 @@
     # Move things around and show the diff
     system "diff -U 0 $e $e.new";
     rename "$e.new", $e or warn("Can't rename $e.new: $!\n");
+  }
 }

 # Move things around and show the ChangeLog diff
@@ -442,7 +444,7 @@
     }
 } elsif ($vcs eq "svn") {
     if (open F, ".svn/entries") {
-        system("svn add ChangeLog") unless (scalar grep /^ChangeLog$/, <F>);
+        system("svn add ChangeLog") unless (scalar grep /ChangeLog/, <F>);
     }
 } else {
     system("$vcs{$vcs}{add} ChangeLog 2>&1 >> /dev/null");
Comment 5 Paul Varner (RETIRED) gentoo-dev 2007-05-22 21:36:33 UTC
gentoolkit-dev-0.2.6.6 will be in the tree within a couple of hours.  I'm waiting for the updated package.mask to propagate before making the commit.
Comment 6 Paul Varner (RETIRED) gentoo-dev 2007-05-23 01:38:33 UTC
Fixed in gentoolkit-0.2.6.6
Comment 7 Fabian Groffen gentoo-dev 2007-08-10 17:29:43 UTC
well, I waited a long time to try this, basically because I have no time to debug this kind of stuff.  Anyway, it is STILL broken.

[ra:portage/sys-apps/portage] % svn rm -f portage-2.2.00.7521.ebuild
D         portage-2.2.00.7521.ebuild
[ra:portage/sys-apps/portage] % svn add portage-2.2.00.7586.ebuild
A         portage-2.2.00.7586.ebuild
[ra:portage/sys-apps/portage] % echangelog "New snapshot which solves creating double prefixes"
--- ChangeLog   2007-08-04 23:43:04.990704552 +0200
+++ ChangeLog.new       2007-08-10 19:21:54.865769375 +0200
@@ -2,6 +2,10 @@
 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  10 Aug 2007; Fabian Groffen <grobian@gentoo.org>
+  -portage-2.2.00.7521.ebuild, +portage-2.2.00.7586.ebuild:
+  New snapshot which solves creating double prefixes
+
 *portage-2.2.00.7571 (04 Aug 2007)
 
   04 Aug 2007; Fabian Groffen <grobian@gentoo.org>
[ra:portage/sys-apps/portage] % emerge -av gentoolkit-dev

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] app-portage/gentoolkit-dev-0.2.6.6  0 kB 

Total: 1 package (1 reinstall), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] n

Quitting.



Again: my own patch worked and always has worked Flawlessly.  Masking 0.2.6.6 again here.
Comment 8 michael@smith-li.com 2008-02-29 21:33:15 UTC
(In reply to comment #7)
> well, I waited a long time to try this, basically because I have no time to
> debug this kind of stuff.  Anyway, it is STILL broken.

<snip>

> Again: my own patch worked and always has worked Flawlessly.  Masking 0.2.6.6
> again here.

I don't actually see what's wrong with the output demonstrated in comment #7.
Comment 9 Fabian Groffen gentoo-dev 2008-02-29 22:05:02 UTC
it doesn't add a new entry for the new portage version added.
Comment 10 Paul Varner (RETIRED) gentoo-dev 2008-11-07 22:20:57 UTC
Created attachment 171052 [details, diff]
Patch to fix echangelog to properly identify added ebuilds

$ svn commit -m "Fix echangelog to properly identify added ebuilds. (Bug #176337)"
Sending        echangelog/echangelog
Transmitting file data .
Committed revision 518.

Please test!
Comment 11 Christian Ruppert (idl0r) gentoo-dev 2008-11-07 23:30:18 UTC
(In reply to comment #10)
> Created an attachment (id=171052) [edit]
> Patch to fix echangelog to properly identify added ebuilds
> 
> $ svn commit -m "Fix echangelog to properly identify added ebuilds. (Bug
> #176337)"
> Sending        echangelog/echangelog
> Transmitting file data .
> Committed revision 518.
> 
> Please test!
> 

_if_ that does not work you can also try my dirty patch from https://bugs.gentoo.org/attachment.cgi?id=170847
(bug 182834)
Comment 12 Fabian Groffen gentoo-dev 2008-12-28 11:54:28 UTC
is this available in an ebuild?
Comment 13 Christian Ruppert (idl0r) gentoo-dev 2008-12-28 12:17:34 UTC
Created attachment 176593 [details, diff]
svn-git-workaround.patch

(In reply to comment #12)
> is this available in an ebuild?
> 

portage-2.2_rc19 should have a patched version and maybe 2.1.6.3.
otherwise see gentoo cvs.
but an additional patch/workaround would be useful then (see attachment)
Comment 14 Christian Ruppert (idl0r) gentoo-dev 2008-12-28 12:21:37 UTC
damn, ignore my comment about portage... i need more coffee.
its in gentoolkit-dev of course :/
Comment 15 Fabian Groffen gentoo-dev 2008-12-28 12:56:26 UTC
is it available in?
app-portage/gentoolkit-dev-0.2.6.8

If yes, I will test in the near future.
Comment 16 Christian Ruppert (idl0r) gentoo-dev 2008-12-28 13:40:55 UTC
(In reply to comment #15)
> is it available in?
> app-portage/gentoolkit-dev-0.2.6.8
> 
nope :/
> If yes, I will test in the near future.
> 
Comment 17 Paul Varner (RETIRED) gentoo-dev 2008-12-31 15:40:39 UTC
It will be in gentoolkit-dev-0.2.6.9 which I have package masked for testing.
Comment 18 Paul Varner (RETIRED) gentoo-dev 2009-01-09 04:50:25 UTC
gentoolkit-0.2.6.9 has been in the tree for about a week. Has anyone been able to test it?
Comment 19 Paul Varner (RETIRED) gentoo-dev 2009-04-29 20:53:30 UTC
gentoolkit-0.2.6.10 has been released. I will close after independent verification that the bug is fixed.
Comment 20 Fabian Groffen gentoo-dev 2009-05-01 18:55:33 UTC
I briefly tested echangelog from 0.2.6.10 and it seems to behave.  At least the behaviour I originally reported in this bug seems to be fixed, at last.

Thanks, bug has been open for long enough now, closing.