Skip to content

Commit 7163c19

Browse files
committed
docs: Rearrange sections; add more documentation
1 parent fec0298 commit 7163c19

2 files changed

Lines changed: 33 additions & 26 deletions

File tree

modules/dnf/README.md

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ repos:
8181
8282
## Package Management
8383
84-
### Packages from Any Repository
84+
### Installing
85+
86+
#### Packages from Any Repository
8587
8688
```yaml
8789
type: dnf
@@ -91,7 +93,7 @@ install:
9193
- package-2
9294
```
9395
94-
### Packages from URL or File
96+
#### Packages from URL or File
9597
9698
- If the OS version is included in the file name or URL, you can substitute it with the `%OS_VERSION%` magic string
9799
- The version is gathered from the `VERSION_ID` field of `/usr/lib/os-release`
@@ -104,7 +106,7 @@ install:
104106
- custom-file.rpm # install files/dnf/custom-file.rpm from the image repository
105107
```
106108

107-
### Install Packages from Specific Repositories
109+
#### Packages from Specific Repositories
108110

109111
- Set `repo` to the name of the RPM repository, not the name or URL of the repo file
110112

@@ -117,17 +119,7 @@ install:
117119
- package-1
118120
```
119121

120-
### Remove Packages
121-
122-
```yaml
123-
type: dnf
124-
remove:
125-
packages:
126-
- package-1
127-
- package-2
128-
```
129-
130-
### Install Package Groups
122+
#### Package Groups
131123

132124
- See list of all package groups by running `dnf5 group list --hidden` on a live system
133125
- Set the option `with-optional` to `true` to enable installation of optional packages in package groups
@@ -141,15 +133,7 @@ group-install:
141133
- wm-package-2
142134
```
143135

144-
### Remove Package Groups
145-
```yaml
146-
type: dnf
147-
group-remove:
148-
packages:
149-
- de-package-2
150-
```
151-
152-
### Replace Packages
136+
#### Replace Packages
153137
- You can specify one or more packages that will be swapped from another repo
154138
- This process uses `distro-sync` to perform this operation
155139
- All packages not specifying `old:` and `new:` will be swapped in a single transaction
@@ -175,7 +159,7 @@ replace:
175159
new: new-package-2
176160
```
177161

178-
### Installation options
162+
#### Options
179163

180164
The following options can specified in the package installation, group installation, and package replacement sections.
181165

@@ -199,7 +183,7 @@ install:
199183
packages:
200184
...
201185
group-install:
202-
skip-unavailable: true
186+
skip-broken: true
203187
packages:
204188
...
205189
replace:
@@ -209,6 +193,29 @@ replace:
209193
...
210194
```
211195

196+
### Removing
197+
198+
#### Packages
199+
200+
- You can set the `auto-remove` option to `false` to only remove the specific package and leave unused dependencies
201+
202+
```yaml
203+
type: dnf
204+
remove:
205+
auto-remove: false
206+
packages:
207+
- package-1
208+
- package-2
209+
```
210+
211+
#### Package Groups
212+
```yaml
213+
type: dnf
214+
group-remove:
215+
packages:
216+
- de-package-2
217+
```
218+
212219
## Optfix
213220

214221
- Optfix is a script used to work around problems with certain packages that install into `/opt/`

modules/dnf/module.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ example: |
77
files:
88
- https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
99
- fury.repo
10-
copr
10+
copr:
1111
- atim/starship
1212
- trixieua/mutter-patched
1313
keys:

0 commit comments

Comments
 (0)