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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user