1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-06 13:38:28 -04:00

feat(dms updater): add support for ignoring specific packages during system updates

- Added UI component & popout settings to manage ignored packages
- Added CLI support available in danklinux docs

Fixes: #2827
Closes: #2344, #1741
Port 1.5

(cherry picked from commit e4657aa5f9)
This commit is contained in:
purian23
2026-07-13 12:02:13 -04:00
committed by dms-ci[bot]
parent dd9edd8a00
commit e9d958b32b
19 changed files with 674 additions and 40 deletions
+15
View File
@@ -1,5 +1,20 @@
package sysupdate
import "regexp"
var safePkgName = regexp.MustCompile(`^[A-Za-z0-9@._+:-]+$`)
// shellSafeNames drops names unsafe to interpolate into the apt/zypper sh -c scripts.
func shellSafeNames(names []string) []string {
out := make([]string, 0, len(names))
for _, n := range names {
if safePkgName.MatchString(n) {
out = append(out, n)
}
}
return out
}
func BackendHasTargets(b Backend, targets []Package, includeAUR, includeFlatpak bool) bool {
if b == nil || len(targets) == 0 {
return false