1 |
commit: 22cf7cc8746dd18f455a93e3292e7b16af5b8180 |
2 |
Author: Johannes Huber <johu <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 30 10:51:23 2012 +0000 |
4 |
Commit: Johannes Huber <johu <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 30 10:51:23 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=22cf7cc8 |
7 |
|
8 |
[Documentation] CODE moved to the wiki, removed duplicated content. |
9 |
|
10 |
--- |
11 |
Documentation/CODE | 171 +--------------------------------------------------- |
12 |
1 files changed, 2 insertions(+), 169 deletions(-) |
13 |
|
14 |
diff --git a/Documentation/CODE b/Documentation/CODE |
15 |
index 2500461..112b5f7 100644 |
16 |
--- a/Documentation/CODE |
17 |
+++ b/Documentation/CODE |
18 |
@@ -1,174 +1,7 @@ |
19 |
WHAT RULES I SHOULD FOLLOW WHEN I WANT TO WORK ON SOMETHING FOR KDE TEAM? |
20 |
-If you asked this question you are reading the right file. |
21 |
- |
22 |
-KDE4 policies: |
23 |
- |
24 |
- - NEVER EVER COMMIT NEW REVBUMPS NOR MAJOR CHANGES TO TREE DIRECTLY - ALWAYS USE overlay |
25 |
- first so that more pairs of eyes can spot issues. Especially anything in kde-base. |
26 |
- |
27 |
- - append valid metadata.xml - not necessarily with <herd>kde</herd> if you're proxy |
28 |
- maintaining some ebuild. Never append ChangeLog because file/folder history is determined by commit log. |
29 |
- |
30 |
- - NEVER EVER commit anything that can break metadata cache. Check every commit at least with repoman -v -d full! |
31 |
- |
32 |
- - always separate DEPEND and RDEPEND properly (adding COMMON_DEPEND if needed) |
33 |
- |
34 |
- - always use kde4-* eclasses. kde4-base for applications with main CMakeLists.txt in toplevel |
35 |
- source directory, kde4-meta for applications hidden deeper in source code directory structure |
36 |
- and requiring common CMakeLists.txt from toplevel directory. |
37 |
- See also KMEXTRA, KMEXTRACTONLY, KMCOMPILEONLY eclass variables. |
38 |
- NEVER FORGET TO INVOKE kde4-{base,meta}_${phase_function} when overriding ebuild phase! |
39 |
- |
40 |
- - always report CMake issues about everything directly to upstream and backport their fix. |
41 |
- |
42 |
- - never use -j1 in ebuilds. Always report the issue upstream and wait for the resolution or fix yourself |
43 |
- |
44 |
- - double check handbook support in your package. For kde4-meta style ebuilds - look for doc/${PN} |
45 |
- or similar directory. Sometimes application handbooks are not trivial to assign (for example |
46 |
- kde-base/khelpcenter ebuild), in such case ask Gentoo KDE team/HT members or contact upstream. |
47 |
- To enable handbook support, set KDE_HANDBOOK=1 before inheriting kde eclasses. |
48 |
- |
49 |
- - think about adding debug USE flag to your package. Do not add debug USE flag for artwork-only and |
50 |
- python-only KDE packages. And don't forget to write metadata.xml entries for new local USE flags. |
51 |
- |
52 |
- - do not enable USE flags by default (IUSE="+useflag") with no *good* reason. "Because I use it" is |
53 |
- not enough. If uncertain - discuss it with the rest of the team. USE flags that are considered as |
54 |
- commonly used, known to work and not pulling any dependencies, can be enabled by default right away. |
55 |
- |
56 |
- - always check for linguas and add them to the KDE_LINGUAS variable. |
57 |
- |
58 |
- - always fix automagic packages with macro_optional_ prefixing and report it upstream with patch. |
59 |
- |
60 |
- - check your apps deps with dynlink-scanner in Documentation/maintainers folder. Be aware, that this tool does not |
61 |
- return complete runtime dependency chain, still it will find most automagic linking dependencies. |
62 |
- |
63 |
- - if you want our herd in the application and you are not Gentoo KDE team/HT member - ask us first. |
64 |
- |
65 |
- - all kde4 and kde-live misc applications should be in SLOT="4". Feel free to fix packages that don't |
66 |
- follow this, and always add the correct blockers (be carefull not to block kde3 packages) |
67 |
- |
68 |
- - if you revbump some snapshots of yet-not-released packages (like phonon, soprano, eigen etc), always ensure |
69 |
- it's visible *only* for those users that really need it and not for every ~arch users. For KDE dependencies, |
70 |
- there are kdedeps-${SLOT} sets created for this purpose. regenerate-files tool will mask those ebuilds |
71 |
- for everyone except those using kde-${SLOT} umask file helper, so those dependencies will be available |
72 |
- only for them. |
73 |
- |
74 |
- - use the add_blocker function to add blocks. This ensures that the blocks are only added to RDEPEND. |
75 |
- |
76 |
-Examples: |
77 |
- |
78 |
- # Block all versions of kdelibs <=4.1.80 |
79 |
- add_blocker kdelibs 4.1.80 |
80 |
- |
81 |
- # Block all versions of kdelibs <4.2.0 |
82 |
- add_blocker kdelibs '<4.2.0' |
83 |
- |
84 |
- # Block all versions of kde-menu (replaced by kdebase-menu) |
85 |
- add_blocker kde-menu |
86 |
- |
87 |
- # Block all versions of kdelibs in KDE 4.1 or prior |
88 |
- add_blocker kdelibs 4.1.50 |
89 |
- |
90 |
- For more details, read the comments in kde4-functions.eclass |
91 |
- |
92 |
- - comment any new blockers you add |
93 |
- |
94 |
- |
95 |
-Commiting: |
96 |
- |
97 |
- - always run repoman full on ebuild subtree you're working on before commiting *anything* |
98 |
- |
99 |
- - try to keep one commit per change if possible. If more appropriate - one commit per feature. |
100 |
- |
101 |
- - all commit messages must look like this: |
102 |
- |
103 |
- [<category/pn>] <detailed message describing what you did> |
104 |
- Also append package version, when needed. |
105 |
- |
106 |
-Examples: |
107 |
- |
108 |
- [kde-base/kdelibs-4.2.3] Synced with tree: fixed bug #333452, removed unnecessary solid patch, added debug to IUSE. |
109 |
- |
110 |
- [kde-base/kdelibs-4.2.3] Moved to tree. |
111 |
- |
112 |
- - when you commit something related to existing bugzilla bug, add inOverlay to keywords to that bug, |
113 |
- so that developers know about it. Also add [overlay-name] to bug summary. |
114 |
- |
115 |
- - if you refactor ebuild names in kde-base, *always* synchronize those changes in following locations |
116 |
- if applicable: |
117 |
- |
118 |
- * sets/ |
119 |
- |
120 |
- * Documentation/package.keywords/ |
121 |
- |
122 |
- * Documentation/package.unmask/ |
123 |
- |
124 |
- Remember to do not edit autogenerated files, as your changes will be lost in next |
125 |
- regenerate-files tool run. |
126 |
- |
127 |
-QA: |
128 |
- |
129 |
- - keep ebuilds clean, look at recommended ebuild formatting rules below (obligatory for kde-base). |
130 |
- Use existing ebuilds (like kdelibs) for reference. |
131 |
- |
132 |
- * sort dependencies alphabetically - it makes it easier to manage them later |
133 |
- |
134 |
- >=app-misc/strigi-0.6.3[dbus,qt4] |
135 |
- dev-libs/libpcre |
136 |
- dev-libs/libxml2 |
137 |
- |
138 |
- * try to separate KEYWORDS and IUSE with some usually invariant variable (like LICENSE) - it makes |
139 |
- it easier to merge changes between live and tagged ebuilds using GUI diff/merge tools. |
140 |
- Always *avoid* merging/synchronizing ebuilds manually if possible - it's error prone. |
141 |
- Use kompare <srcfile> <destfile> for it. |
142 |
- |
143 |
-KEYWORDS="~amd64 ~x86" |
144 |
-LICENSE="LGPL-2.1" |
145 |
-IUSE="3dnow acl alsa altivec bindist +bzip2 debug doc fam jpeg2k kerberos |
146 |
-mmx nls openexr +semantic-desktop spell sse sse2 ssl zeroconf" |
147 |
- |
148 |
- * put blocks at the begin of RDEPEND section, !useflag? ( ) preferably before useflag? ( ) - |
149 |
- - it's easier to spot them when they're in expected location |
150 |
- |
151 |
-RDEPEND="${DEPEND} |
152 |
- !kdeprefix? ( !dev-libs/libconvert ) |
153 |
-" |
154 |
- |
155 |
- * put optional dependencies after obligatory ones - again - improves readability |
156 |
- |
157 |
- x11-proto/renderproto |
158 |
- xinerama? ( x11-proto/xineramaproto ) |
159 |
- |
160 |
- * avoid single line expressions - they are utterly unreadable |
161 |
- |
162 |
- ssl? ( dev-libs/openssl ) |
163 |
- zeroconf? ( |
164 |
- || ( |
165 |
- net-dns/avahi[mdnsresponder-compat] |
166 |
- !bindist? ( net-misc/mDNSResponder ) |
167 |
- ) |
168 |
- ) |
169 |
- |
170 |
- * always indent dependencies with <tab> characters from new line (including other variable like |
171 |
- ${COMMONDEPEND} may be exception here) and always break line *after* dependency - it makes it easier to |
172 |
- synchronize such deps semi-automatically between ebuilds using GUI diff/merge tools (less conflicts). |
173 |
- The same applies to PATCHES as well. |
174 |
- |
175 |
-COMMONDEPEND=" |
176 |
- >=app-misc/strigi-0.6.3[dbus,qt4] |
177 |
-" |
178 |
-# sth? ( dev/foo ) - re-add when in tree |
179 |
-DEPEND="${COMMONDEPEND} |
180 |
- doc? ( app-doc/doxygen ) |
181 |
- nls? ( virtual/libintl ) |
182 |
-" |
183 |
- |
184 |
-PATCHES=( |
185 |
- "${FILESDIR}/dist/09_disable_debug_messages_if_not_explicitly_enabled.patch" |
186 |
- "${FILESDIR}/dist/20_use_dejavu_as_default_font.patch" |
187 |
- "${FILESDIR}/dist/23_solid_no_double_build.patch" |
188 |
-) |
189 |
+If you asked this question, you want to read: |
190 |
|
191 |
+http://wiki.gentoo.org/wiki/Project:KDE/Coding_style |
192 |
|
193 |
# NOT FOLLOWING THESE RULES WILL BE PUNISHED! |
194 |
# No cookies for week! |