Skip to content

Commit d9f44c4

Browse files
committed
Protect our special yaml
1 parent 300a16b commit d9f44c4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/packaging/packaging-practices.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ The `patterns` key expects a `dict(s)` argument. The default key for each patter
306306

307307
There are two ways to name a pattern. Say you have a package named `foo`, and you want to create a subpackage `foo-bar`. You can do this by creating a pattern with the key `bar`. The name of the key will be appended to the name of the package.
308308

309+
<!-- prettier-ignore -->
309310
```yaml
310311
name : foo
311312
patterns :
@@ -315,6 +316,7 @@ patterns :
315316

316317
If you don't want the name of the subpackage to start with the name of the main package, you can do that, too. Keys starting with a `^` character will not prepend the base package name to the name of the subpackage. If you want to create a package named `bar` from the `foo` package, it would look like this:
317318

319+
<!-- prettier-ignore -->
318320
```yaml
319321
name : foo
320322
patterns :
@@ -328,6 +330,7 @@ Often with subpackages, you will want a different component, summary, descriptio
328330

329331
If you have package `foo` and subpackage `foo-bar`, changing the properties would look like this:
330332

333+
<!-- prettier-ignore -->
331334
```yaml
332335
name : foo
333336
license :
@@ -357,13 +360,15 @@ Usually, packages will automatically depend on created subpackages by default. C
357360

358361
In this example from `libjpeg-turbo`, we move all documentation into the `docs` subpackage:
359362

363+
<!-- prettier-ignore -->
360364
```yaml
361365
patterns :
362366
- docs : [/usr/share/man]
363367
```
364368

365369
This example, taken from the `wayland` package, ensures the binaries from `/usr/bin` and the directory `/usr/share/wayland` are located in the `devel` subpackage:
366370

371+
<!-- prettier-ignore -->
367372
```yaml
368373
patterns :
369374
- devel :
@@ -373,6 +378,7 @@ patterns :
373378

374379
To create a header-only package, like `spirv-headers`, create a pattern that matches all files. This can also be used in cases where you don't want any automatically-generated subpackages.
375380

381+
<!-- prettier-ignore -->
376382
```yaml
377383
patterns :
378384
- /*
@@ -388,7 +394,8 @@ The `replaces` ypkg key uses the `dict(s)` type, and the default key is assumed
388394

389395
In this example, we rename the `libgeoclue*` packages to use the correct names, and ensure a working upgrade path.
390396

391-
```
397+
<!-- prettier-ignore -->
398+
```yaml
392399
replaces:
393400
- devel: libgeoclue-devel
394401
- libgeoclue

0 commit comments

Comments
 (0)