Gentoo Archives: gentoo-dev

From: gokturk@××××××××××.edu
To: devmanual@g.o
Cc: gentoo-dev@l.g.o, Gokturk Yuksek <gokturk@××××××××××.edu>
Subject: [gentoo-dev] [PATCH v3 11/21] ebuild-maintenance: rewrite the subsection on moving ebuilds for git #558642
Date: Thu, 04 Feb 2016 01:07:42
Message-Id: 1454547469-22487-12-git-send-email-gokturk@binghamton.edu
In Reply to: [gentoo-dev] [PATCH v3 00/21] devmanual: update the docs for post git-migration by gokturk@binghamton.edu
1 From: Gokturk Yuksek <gokturk@××××××××××.edu>
2
3 Rename the subsection to "moving a package" and rewrite it from scratch.
4 The previous workflow suggested a 2 step process whereas the new one
5 suggests a single git commit to contain all the changes.
6
7 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=558642
8 Signed-off-by: Gokturk Yuksek <gokturk@××××××××××.edu>
9 ---
10 ebuild-maintenance/text.xml | 92 +++++++++++++++++++++++++++++----------------
11 1 file changed, 59 insertions(+), 33 deletions(-)
12
13 diff --git a/ebuild-maintenance/text.xml b/ebuild-maintenance/text.xml
14 index 28442a3..74ef88b 100644
15 --- a/ebuild-maintenance/text.xml
16 +++ b/ebuild-maintenance/text.xml
17 @@ -290,56 +290,82 @@ to be in very poor taste and may result in disciplinary action.
18 </section>
19
20 <section>
21 -<title>Moving ebuilds</title>
22 +<title>Moving a package</title>
23 <body>
24
25 <p>
26 -Moving ebuilds is a two-step process:
27 +Moving a package in the tree requires several operations. Firstly,
28 +the package directory needs to be moved to the correct category
29 +using <c>git mv</c>. After this, a new entry needs to be added to
30 +the latest file in <path>profiles/updates/</path> in the
31 +following format:
32 </p>
33
34 -<p>
35 -Firstly, you need to move the ebuild in CVS. To do this, you should
36 -copy the ebuild to its new location and commit that as you would with
37 -a <uri link="#adding-a-new-ebuild">new ebuild</uri>.
38 -</p>
39 +<pre caption="Adding an entry to updates">
40 +move old-category/package-name new-category/package-name
41 +</pre>
42
43 <p>
44 -After this, you should change any ebuilds which <c>DEPEND</c> on the
45 -old ebuild to depend on the new one. After this, should add an entry to the
46 -latest file in <path>profiles/updates/</path> in the Portage tree in the in
47 -the following format:
48 +Following the update entry, ebuilds that have a
49 +<uri link="::general-concepts/dependencies">dependency</uri>
50 +to this package (in other words, the reverse dependencies of
51 +the package to be moved) need to be updated properly.
52 </p>
53
54 -<pre caption="Adding an entry to updates">
55 -move net-misc/fwbuilder net-firewall/fwbuilder
56 -</pre>
57 -
58 <p>
59 -This example would transparently move <path>net-misc/fwbuilder</path> to
60 -<path>net-firewall/fwbuilder</path> if users have it installed. This
61 -way, users would now automatically receive updates
62 -for <path>net-firewall/fwbuilder</path> when they are available.
63 +Next is checking the files under <path>profiles/</path> such as
64 +<path>profiles/package.mask</path> and update them to reflect the ebuild
65 +move. Various eclasses automatically provide some of the dependencies upon
66 +inherit, so the files under <path>eclass/</path> should be checked and updated
67 +properly as well. Lastly, the titles of the open bugs related to the package
68 +should be updated.
69 </p>
70
71 <p>
72 -Once this step is concluded, you are allowed to remove the old package.
73 -Simply issue a <c>cvs remove -Rf $PN</c> in the package category and commit
74 -the changes afterwards with a meaningful commit message. Don't forget to update
75 -entries in files such as profiles/package.mask to reflect the new category. Finally
76 -remember to change the title to open bugs related to this package if needed.
77 +Here is an example where the package
78 +<path>net-misc/fwbuilder</path> is transparently moved to
79 +<path>net-firewall/fwbuilder</path>:
80 </p>
81
82 -<pre caption="Removing a package">
83 -net-misc # cvs rm -Rf fwbuilder
84 -cvs remove: use `cvs commit' to remove these files permanently
85 -net-misc # cvs ci -m "Moving net-misc/fwbuilder to net-firewall/fwbuilder."
86 +<ol>
87 + <li>Issue <c>git mv net-misc/fwbuilder net-firewall/fwbuilder</c></li>
88 + <li>
89 + <p>
90 + Add the following entry to the latest file in
91 + <path>profile/updates/</path>:
92 + </p>
93 + <p><c>move net-misc/fwbuilder net-firewall/fwbuilder</c></p>
94 + </li>
95 + <li>Update the reverse dependencies of the package</li>
96 + <li>
97 + Update <path>profiles/package.mask</path> and other related files under
98 + <path>profiles/</path>
99 + </li>
100 + <li>Check the eclasses that may be referencing the package</li>
101 + <li>
102 + Stage all the changed files using <c>git add</c>. For example: <c>git add
103 + profiles/package.mask</c>
104 + </li>
105 + <li>
106 + Commit all the changes in one commit using: <c>git commit --gpg-sign</c>
107 + </li>
108 + <li>Update any open bugs related to the package</li>
109 +</ol>
110 +
111 +<p>
112 +It is very important to commit all the changes in a single commit to ensure
113 +that no breakage occurs. The commit message should follow a format similar
114 +to the following:
115 +</p>
116 +
117 +<pre>
118 +commit d391643289097344a0b18ab2665bb26198a0e3a1
119 +Author: Guilherme Amadio &lt;amadio@g.o&gt;
120 +Date: Tue Nov 3 20:26:52 2015 +0100
121 +
122 + media-fonts/nanumfont: renamed to media-fonts/nanum
123 </pre>
124
125 -<note>
126 -CVS cannot destroy directories: it will simply not re-create them if
127 -they are blank, providing you use CVS with the <c>-P</c> flag.
128 -</note>
129 -
130 </body>
131 </section>
132
133 --
134 2.4.10