(self, include_sub_packages: bool = False)
| 200 | return self.packages_text() |
| 201 | |
| 202 | def packages_text(self, include_sub_packages: bool = False) -> str: |
| 203 | packages = set() |
| 204 | |
| 205 | if self.packages: |
| 206 | packages = set(self.packages) |
| 207 | |
| 208 | if include_sub_packages: |
| 209 | for sub_profile in self.current_selection: |
| 210 | if sub_profile.packages: |
| 211 | packages.update(sub_profile.packages) |
| 212 | |
| 213 | text = tr('Installed packages') + ':\n' |
| 214 | |
| 215 | for pkg in sorted(packages): |
| 216 | text += f' - {pkg}\n' |
| 217 | |
| 218 | return text |