Gentoo Archives: gentoo-dev

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