Skip to content

Commit 45d5b56

Browse files
mmathesiussgallagher
authored andcommitted
Documentation fixes and cleanup:
* Add PackagerV3 and BuildConfig public APIs to documentation index * Remove StreamV3 references from ModuleIndex documentation * Fix PackagerV3 and other broken documentation links Signed-off-by: Merlin Mathesius <[email protected]>
1 parent 751d0f6 commit 45d5b56

File tree

7 files changed

+77
-94
lines changed

7 files changed

+77
-94
lines changed

modulemd/include/modulemd-2.0/modulemd-module-index.h

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,18 @@ G_BEGIN_DECLS
3232
* This object provides an interface to the complete metadata read from a
3333
* repository or manually added to this object.
3434
*
35-
* NOTE: When adding or updating this object from YAML, all
36-
* #ModulemdModuleStream will be automatically upgraded to match the stream
37-
* mdversion set for the index, and all #ModulemdDefaults objects imported will
38-
* be automatically upgraded to match the highest version of that object that
39-
* has been previously seen. This means, for example, that if the repository
40-
* has a mix of #ModulemdModuleStreamV1 and #ModulemdModuleStreamV2 objects,
41-
* and the index's stream mdversion is set to V2, the index will contain only
42-
* #ModulemdModuleStreamV2. You can check the versions the index upgraded to
43-
* with the modulemd_module_index_get_stream_mdversion() and
35+
* NOTE: When adding or updating this object from YAML, all objects imported
36+
* will be automatically upgraded to match the highest version of that object
37+
* that is seen. This means that if the repository has a mix of
38+
* #ModulemdModuleStreamV1 and #ModulemdModuleStreamV2 objects, the index will
39+
* contain only #ModulemdModuleStreamV2. You can check the versions the index
40+
* upgraded to with the modulemd_module_index_get_stream_mdversion() and
4441
* modulemd_module_index_get_defaults_mdversion(). If your application would
4542
* prefer to always work with a particular stream or defaults version (such as
46-
* to avoid extra branching logic), modulemd_set_default_stream_mdversion() can
47-
* be used before creating the index to force #ModulemdModuleStream objects to
48-
* be upgraded to the desired stream mdversion and
49-
* modulemd_module_index_upgrade_defaults() function can be used to force the
50-
* contents of the index to upgrade #ModulemdDefaults to the specified version.
43+
* to avoid extra branching logic), the modulemd_module_index_upgrade_streams()
44+
* and modulemd_module_index_upgrade_defaults() functions can be used to force
45+
* the contents of the index to upgrade to those versions.
46+
*
5147
* Interacting with #ModulemdModuleIndex is relatively simple. A common Python
5248
* example for working with Fedora repodata might be (assuming the metadata has
5349
* already been read into strings):

modulemd/include/modulemd-2.0/modulemd-packager-v3.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ G_DECLARE_FINAL_TYPE (
3939
/**
4040
* MMD_PACKAGER_DEFAULT_MODULE_LICENSE:
4141
*
42-
* The ModulePackager v3 default module metadata license.
42+
* The #ModulemdPackagerV3 default module metadata license.
4343
*
4444
* Since: 2.11
4545
*/
@@ -50,12 +50,12 @@ G_DECLARE_FINAL_TYPE (
5050
* @MD_PACKAGER_VERSION_ERROR: Represents an error handling module stream
5151
* version.
5252
* @MD_PACKAGER_VERSION_UNSET: Represents an unset module stream version.
53-
* @MD_PACKAGER_VERSION_TWO: Represents v2 of the #ModulemdPackager
53+
* @MD_PACKAGER_VERSION_TWO: Represents v2 of the ModulePackager
5454
* metadata format. Since: 2.11
55-
* @MD_PACKAGER_VERSION_THREE: Represents v3 of the #ModulemdPackager
55+
* @MD_PACKAGER_VERSION_THREE: Represents v3 of the ModulePackager
5656
* metadata format. Since: 2.11
5757
* @MD_PACKAGER_VERSION_LATEST: Represents the highest-supported version of
58-
* the #ModulemdPackager metadata format.
58+
* the ModulePackager metadata format.
5959
*
6060
* Since: 2.11
6161
*/
@@ -86,6 +86,7 @@ modulemd_packager_v3_new (void);
8686

8787
/**
8888
* modulemd_packager_v3_copy:
89+
* @self: This #ModulemdPackagerV3 object.
8990
*
9091
* Returns: (transfer full): A newly-allocated deep-copy of this
9192
* #ModulemdPackagerV3 object. This object must be freed with g_object_unref().

modulemd/include/private/modulemd-build-config-private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ G_BEGIN_DECLS
3131
/**
3232
* modulemd_build_config_parse_yaml:
3333
* @parser: A #yaml_parser_t positioned at the start of a configuration
34-
* entry of a ModulemdPackager v3 YAML document.
34+
* entry of a #ModulemdPackagerV3 YAML document.
3535
* @strict: Whether to ignore unknown keys in the YAML
3636
* @error: (out): A #GError explaining any failure to complete the parsing
3737
*

modulemd/include/private/modulemd-module-stream-private.h

Lines changed: 53 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,14 @@ modulemd_module_stream_validate_component_rpm_arches (GHashTable *components,
137137
/* Some macros used for copy operations */
138138
/**
139139
* STREAM_UPGRADE_IF_SET_FULL:
140-
* @oldversion: The stream version of @src. Must be literal "v1", "v2", or "v3"
140+
* @oldversion: The stream version of @src. Must be literal "v1" or "v2"
141141
* without the quotes.
142-
* @newversion: The stream version of @dest. Must be literal "v1", "v2", or "v3"
142+
* @newversion: The stream version of @dest. Must be literal "v1" or "v2"
143143
* without the quotes.
144-
* @dest: (out): A #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, or
145-
* #ModulemdModuleStreamV3 object that is the destination to which @property is
146-
* to be copied.
147-
* @src: (in): A #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, or
148-
* #ModulemdModuleStreamV3 object that is the source from which @property is to
149-
* be copied.
144+
* @dest: (out): A #ModulemdModuleStreamV1 or #ModulemdModuleStreamV2 object
145+
* that is the destination to which @property is to be copied.
146+
* @src: (in): A #ModulemdModuleStreamV1 or #ModulemdModuleStreamV2 object that
147+
* is the source from which @property is to be copied.
150148
* @property: The name of the property to copy. Must be the literal property
151149
* name, in lower case, without quotes.
152150
* @locale...: (in): An optional locale that can be provided when @property has
@@ -158,8 +156,8 @@ modulemd_module_stream_validate_component_rpm_arches (GHashTable *components,
158156
* which should be used instead.
159157
*
160158
* This is a helper macro to simplify the coding when copying/upgrading
161-
* properties between #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, and
162-
* #ModulemdModuleStreamV3 objects.
159+
* properties between #ModulemdModuleStreamV1 and #ModulemdModuleStreamV2
160+
* objects.
163161
*
164162
* Does nothing if the @src @property is NULL.
165163
*
@@ -180,14 +178,12 @@ modulemd_module_stream_validate_component_rpm_arches (GHashTable *components,
180178

181179
/**
182180
* STREAM_COPY_IF_SET:
183-
* @version: The stream version being copied. Must be literal "v1", "v2", or "v3"
181+
* @version: The stream version being copied. Must be literal "v1" or "v2"
184182
* without the quotes.
185-
* @dest: (out): A #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, or
186-
* #ModulemdModuleStreamV3 object that is the destination to which @property is
187-
* to be copied.
188-
* @src: (in): A #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, or
189-
* #ModulemdModuleStreamV3 object that is the source from which @property is to
190-
* be copied.
183+
* @dest: (out): A #ModulemdModuleStreamV1 or #ModulemdModuleStreamV2 object
184+
* that is the destination to which @property is to be copied.
185+
* @src: (in): A #ModulemdModuleStreamV1 or #ModulemdModuleStreamV2 object that
186+
* is the source from which @property is to be copied.
191187
* @property: The name of the property to copy. Must be the literal property
192188
* name, in lower case, without quotes.
193189
*
@@ -204,22 +200,20 @@ modulemd_module_stream_validate_component_rpm_arches (GHashTable *components,
204200

205201
/**
206202
* STREAM_UPGRADE_IF_SET:
207-
* @oldversion: The stream version of @src. Must be literal "v1", "v2", or "v3"
203+
* @oldversion: The stream version of @src. Must be literal "v1" or "v2"
208204
* without the quotes.
209-
* @newversion: The stream version of @dest. Must be literal "v1", "v2", or "v3"
205+
* @newversion: The stream version of @dest. Must be literal "v1" or "v2"
210206
* without the quotes.
211-
* @dest: (out): A #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, or
212-
* #ModulemdModuleStreamV3 object that is the destination to which @property is
213-
* to be copied.
214-
* @src: (in): A #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, or
215-
* #ModulemdModuleStreamV3 object that is the source from which @property is to
216-
* be copied.
207+
* @dest: (out): A #ModulemdModuleStreamV1 or #ModulemdModuleStreamV2 object
208+
* that is the destination to which @property is to be copied.
209+
* @src: (in): A #ModulemdModuleStreamV1 or #ModulemdModuleStreamV2 object that
210+
* is the source from which @property is to be copied.
217211
* @property: The name of the property to copy. Must be the literal property
218212
* name, in lower case, without quotes.
219213
*
220214
* This is a convenience macro to simplify the coding when copying properties
221-
* between #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, and
222-
* #ModulemdModuleStreamV3 objects when @src and @dest are different versions.
215+
* between #ModulemdModuleStreamV1 and #ModulemdModuleStreamV2 objects when
216+
* @src and @dest are different versions.
223217
*
224218
* Does nothing if the @src @property is NULL.
225219
*
@@ -230,22 +224,20 @@ modulemd_module_stream_validate_component_rpm_arches (GHashTable *components,
230224

231225
/**
232226
* STREAM_COPY_IF_SET_WITH_LOCALE:
233-
* @version: The stream version being copied. Must be literal "v1", "v2", or "v3"
227+
* @version: The stream version being copied. Must be literal "v1" or "v2"
234228
* without the quotes.
235-
* @dest: (out): A #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, or
236-
* #ModulemdModuleStreamV3 object that is the destination to which @property is
237-
* to be copied.
238-
* @src: (in): A #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, or
239-
* #ModulemdModuleStreamV3 object that is the source from which @property is to
240-
* be copied.
229+
* @dest: (out): A #ModulemdModuleStreamV1 or #ModulemdModuleStreamV2 object
230+
* that is the destination to which @property is to be copied.
231+
* @src: (in): A #ModulemdModuleStreamV1 or #ModulemdModuleStreamV2 object that
232+
* is the source from which @property is to be copied.
241233
* @property: The name of the property to copy. Must be the literal property
242234
* name, in lower case, without quotes.
243235
*
244236
* This is a convenience macro to simplify the coding when copying properties
245-
* between #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, and
246-
* #ModulemdModuleStreamV3 objects when both @src and @dest are the same version
247-
* and @property has possible translations. Only the untranslated (`"C"` locale)
248-
* version of @property will be copied.
237+
* between #ModulemdModuleStreamV1 and #ModulemdModuleStreamV2 objects when
238+
* both @src and @dest are the same version and @property has possible
239+
* translations. Only the untranslated (`"C"` locale) version of @property will
240+
* be copied.
249241
*
250242
* Does nothing if the @src @property is NULL.
251243
*
@@ -256,24 +248,22 @@ modulemd_module_stream_validate_component_rpm_arches (GHashTable *components,
256248

257249
/**
258250
* STREAM_UPGRADE_IF_SET_WITH_LOCALE:
259-
* @oldversion: The stream version of @src. Must be literal "v1", "v2", or "v3"
251+
* @oldversion: The stream version of @src. Must be literal "v1" or "v2"
260252
* without the quotes.
261-
* @newversion: The stream version of @dest. Must be literal "v1", "v2", or "v3"
253+
* @newversion: The stream version of @dest. Must be literal "v1" or "v2"
262254
* without the quotes.
263-
* @dest: (out): A #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, or
264-
* #ModulemdModuleStreamV3 object that is the destination to which @property is
265-
* to be copied.
266-
* @src: (in): A #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, or
267-
* #ModulemdModuleStreamV3 object that is the source from which @property is to
268-
* be copied.
255+
* @dest: (out): A #ModulemdModuleStreamV1 or #ModulemdModuleStreamV2 object
256+
* that is the destination to which @property is to be copied.
257+
* @src: (in): A #ModulemdModuleStreamV1 or #ModulemdModuleStreamV2 object that
258+
* is the source from which @property is to be copied.
269259
* @property: The name of the property to copy. Must be the literal property
270260
* name, in lower case, without quotes.
271261
*
272262
* This is a convenience macro to simply the coding when copying properties
273-
* between #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, and
274-
* #ModulemdModuleStreamV3 objects when @src and @dest are different versions
275-
* and @property has possible translations. Only the untranslated (`"C"` locale)
276-
* version of @property will be copied.
263+
* between #ModulemdModuleStreamV1 and #ModulemdModuleStreamV2 objects when
264+
* @src and @dest are different versions and @property has possible
265+
* translations. Only the untranslated (`"C"` locale) version of @property will
266+
* be copied.
277267
*
278268
* Does nothing if the @src @property is NULL.
279269
*
@@ -285,21 +275,18 @@ modulemd_module_stream_validate_component_rpm_arches (GHashTable *components,
285275

286276
/**
287277
* STREAM_REPLACE_HASHTABLE:
288-
* @version: The stream version being replaced. Must be literal "v1", "v2", or "v3"
278+
* @version: The stream version being replaced. Must be literal "v1" or "v2"
289279
* without the quotes.
290-
* @dest: (out): A #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, or
291-
* #ModulemdModuleStreamV3 object that is the destination at which @property is
292-
* being replaced.
293-
* @src: (in): A #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, or
294-
* #ModulemdModuleStreamV3 object that is the source from which @property is
295-
* being replaced.
280+
* @dest: (out): A #ModulemdModuleStreamV1 or #ModulemdModuleStreamV2 object
281+
* that is the destination at which @property is being replaced.
282+
* @src: (in): A #ModulemdModuleStreamV1 or #ModulemdModuleStreamV2 object that
283+
* is the source from which @property is being replaced.
296284
* @property: The name of the #GHashTable property to replace. Must be the
297285
* literal property name, in lower case, without quotes.
298286
*
299287
* This is a convenience macro to simply the coding when replacing #GHashTable
300-
* properties of #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, and
301-
* #ModulemdModuleStreamV3 objects when both @src and @dest are the same
302-
* version.
288+
* properties of #ModulemdModuleStreamV1 and #ModulemdModuleStreamV2 objects
289+
* when both @src and @dest are the same version.
303290
*
304291
* Since: 2.0
305292
*/
@@ -313,21 +300,18 @@ modulemd_module_stream_validate_component_rpm_arches (GHashTable *components,
313300

314301
/**
315302
* COPY_HASHTABLE_BY_VALUE_ADDER:
316-
* @dest: (out): A #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, or
317-
* #ModulemdModuleStreamV3 object that is the destination to which @property is
318-
* to be copied.
319-
* @src: (in): A #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, or
320-
* #ModulemdModuleStreamV3 object that is the source from which @property is to
321-
* be copied.
303+
* @dest: (out): A #ModulemdModuleStreamV1 or #ModulemdModuleStreamV2 object
304+
* that is the destination to which @property is to be copied.
305+
* @src: (in): A #ModulemdModuleStreamV1 or #ModulemdModuleStreamV2 object that
306+
* is the source from which @property is to be copied.
322307
* @property: The name of the #GHashTable property to copy. Must be the literal
323308
* property name, in lower case, without quotes.
324309
* @adder: (in): A pointer to a method of @dest that supports add-on property
325310
* values.
326311
*
327312
* This is a convenience macro to simply the coding when copying #GHashTable
328-
* properties between #ModulemdModuleStreamV1, #ModulemdModuleStreamV2, and
329-
* #ModulemdModuleStreamV3 objects when the property is set by using add-on
330-
* values.
313+
* properties between #ModulemdModuleStreamV1 and #ModulemdModuleStreamV2
314+
* objects when the property is set by using add-on values.
331315
*
332316
* Since: 2.0
333317
*/

modulemd/include/private/modulemd-packager-v3-private.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ modulemd_packager_v3_parse_yaml (ModulemdSubdocumentInfo *subdoc,
113113

114114
/**
115115
* modulemd_packager_v3_emit_yaml:
116-
* @self: This #ModulemdModulePackagerV3 object.
116+
* @self: This #ModulemdPackagerV3 object.
117117
* @emitter: (inout): A libyaml emitter object positioned where the data
118-
* section of a #ModulemdModulePackagerV3 belongs in the YAML document.
118+
* section of a #ModulemdPackagerV3 belongs in the YAML document.
119119
* @error: (out): A #GError that will return the reason for an emission or
120120
* validation error.
121121
*

modulemd/include/private/modulemd-yaml.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ G_BEGIN_DECLS
4242
* @MODULEMD_YAML_DOC_TRANSLATIONS: Represents a `modulemd-translations` (see
4343
* #ModulemdTranslation) YAML document type.
4444
* @MODULEMD_YAML_DOC_PACKAGER: Represents a `modulemd-packager` document.
45-
* V2 is a subset of #ModuleStreamV2 containing only the attributes that a
45+
* V2 is a subset of #ModulemdModuleStreamV2 containing only the attributes that a
4646
* package maintainer should modify. V3 (see #ModulemdPackagerV3) is a new YAML
4747
* document type. Since: 2.9
4848
* @MODULEMD_YAML_DOC_OBSOLETES: Represents a `modulemd-obsoletes` document (see
@@ -791,7 +791,7 @@ modulemd_yaml_parse_string_string_map (yaml_parser_t *parser, GError **error);
791791
* validation error.
792792
*
793793
* Function for retrieving a hash table from a str/string-set map such as
794-
* data.dependencies in ModuleStreamV2.
794+
* data.dependencies in #ModulemdModuleStreamV2.
795795
*
796796
* Returns: (transfer full): A newly-allocated #GHashTable * representing the
797797
* parsed values. NULL if a parse error occurred and sets @error appropriately.

modulemd/modulemd-docs.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<chapter>
3737
<title>Modulemd 2.0 Public API</title>
3838
<xi:include href="xml/modulemd.xml"/>
39+
<xi:include href="xml/modulemd-build-config.xml"/>
3940
<xi:include href="xml/modulemd-buildopts.xml"/>
4041
<xi:include href="xml/modulemd-component.xml"/>
4142
<xi:include href="xml/modulemd-component-module.xml"/>
@@ -51,6 +52,7 @@
5152
<xi:include href="xml/modulemd-module-stream.xml"/>
5253
<xi:include href="xml/modulemd-module-stream-v1.xml"/>
5354
<xi:include href="xml/modulemd-module-stream-v2.xml"/>
55+
<xi:include href="xml/modulemd-packager-v3.xml"/>
5456
<xi:include href="xml/modulemd-profile.xml"/>
5557
<xi:include href="xml/modulemd-rpm-map-entry.xml"/>
5658
<xi:include href="xml/modulemd-service-level.xml"/>
@@ -61,7 +63,7 @@
6163
</chapter>
6264
<chapter>
6365
<title>Modulemd 2.0 Private Object Methods</title>
64-
<xi:include href="xml/modulemd-build-config.xml"/>
66+
<xi:include href="xml/modulemd-build-config-private.xml"/>
6567
<xi:include href="xml/modulemd-buildopts-private.xml"/>
6668
<xi:include href="xml/modulemd-component-private.xml"/>
6769
<xi:include href="xml/modulemd-component-module-private.xml"/>
@@ -75,7 +77,7 @@
7577
<xi:include href="xml/modulemd-module-stream-private.xml"/>
7678
<xi:include href="xml/modulemd-module-stream-v1-private.xml"/>
7779
<xi:include href="xml/modulemd-module-stream-v2-private.xml"/>
78-
<xi:include href="xml/modulemd-packager-v3.xml"/>
80+
<xi:include href="xml/modulemd-packager-v3-private.xml"/>
7981
<xi:include href="xml/modulemd-profile-private.xml"/>
8082
<xi:include href="xml/modulemd-rpm-map-entry-private.xml"/>
8183
<xi:include href="xml/modulemd-service-level-private.xml"/>

0 commit comments

Comments
 (0)