diff --git a/src/bpmlib/dependencies.go b/src/bpmlib/dependencies.go index 5807dae..61fa911 100644 --- a/src/bpmlib/dependencies.go +++ b/src/bpmlib/dependencies.go @@ -159,7 +159,7 @@ func ResolveDependencies(pkgInfo *PackageInfo, resolvedVirtualPackages map[strin } // Skip ignored packages in config - if slices.Contains(MainBPMConfig.IgnorePackages, dependEntry.Info.Name) { + if rootDir == "/" && slices.Contains(MainBPMConfig.IgnorePackages, dependEntry.Info.Name) { continue } diff --git a/src/bpmlib/general.go b/src/bpmlib/general.go index 73ee455..d0be1da 100644 --- a/src/bpmlib/general.go +++ b/src/bpmlib/general.go @@ -223,7 +223,7 @@ func RemovePackages(rootDir string, force, cleanupDependencies bool, packages .. packageDepndants := make(map[string][]string, 0) for _, action := range operation.Actions { // Skip package if ignored in config - if slices.Contains(MainBPMConfig.IgnorePackages, action.(*RemovePackageAction).BpmPackage.PkgInfo.Name) { + if rootDir == "/" && slices.Contains(MainBPMConfig.IgnorePackages, action.(*RemovePackageAction).BpmPackage.PkgInfo.Name) { continue } @@ -243,7 +243,7 @@ func RemovePackages(rootDir string, force, cleanupDependencies bool, packages .. // Remove dependant packages if ignored for pkg, required := range packageDepndants { required = slices.DeleteFunc(required, func(pkgName string) bool { - return slices.Contains(MainBPMConfig.IgnorePackages, pkgName) + return rootDir == "/" && slices.Contains(MainBPMConfig.IgnorePackages, pkgName) }) packageDepndants[pkg] = required } @@ -404,7 +404,7 @@ func UpdatePackages(rootDir string, syncDatabase, allowDowngrades, forceInstalla // Search for packages pkgsNotFound := make([]string, 0) for _, pkg := range pkgs { - if slices.Contains(MainBPMConfig.IgnorePackages, pkg) { + if rootDir == "/" && slices.Contains(MainBPMConfig.IgnorePackages, pkg) { continue } var entry *BPMDatabaseEntry @@ -457,7 +457,7 @@ func UpdatePackages(rootDir string, syncDatabase, allowDowngrades, forceInstalla } // Skip dependency if ignored in config - if slices.Contains(MainBPMConfig.IgnorePackages, dependEntry.Info.Name) { + if rootDir == "/" && slices.Contains(MainBPMConfig.IgnorePackages, dependEntry.Info.Name) { continue } @@ -499,7 +499,7 @@ func UpdatePackages(rootDir string, syncDatabase, allowDowngrades, forceInstalla } // Skip dependency if ignored in config - if slices.Contains(MainBPMConfig.IgnorePackages, dependEntry.Info.Name) { + if rootDir == "/" && slices.Contains(MainBPMConfig.IgnorePackages, dependEntry.Info.Name) { continue } diff --git a/src/bpmlib/packages.go b/src/bpmlib/packages.go index 2d5a1c8..731000f 100644 --- a/src/bpmlib/packages.go +++ b/src/bpmlib/packages.go @@ -703,7 +703,7 @@ func extractPackage(bpmpkg *BPMPackage, verbose bool, filename, rootDir string) if ok := slices.ContainsFunc(MainBPMConfig.IgnorePaths, func(s string) bool { matched, _ := filepath.Match(s, header.Name) return matched - }); ok { + }); rootDir == "/" && ok { if verbose { fmt.Printf("Skipping Directory: %s (Path was ignored)\n", extractFilename) } @@ -741,7 +741,7 @@ func extractPackage(bpmpkg *BPMPackage, verbose bool, filename, rootDir string) if ok := slices.ContainsFunc(MainBPMConfig.IgnorePaths, func(s string) bool { matched, _ := filepath.Match(s, header.Name) return matched - }); ok { + }); rootDir == "/" && ok { if verbose { fmt.Printf("Skipping File: %s (Path was ignored)\n", extractFilename) } @@ -809,7 +809,7 @@ func extractPackage(bpmpkg *BPMPackage, verbose bool, filename, rootDir string) if ok := slices.ContainsFunc(MainBPMConfig.IgnorePaths, func(s string) bool { matched, _ := filepath.Match(s, header.Name) return matched - }); ok { + }); rootDir == "/" && ok { if verbose { fmt.Printf("Skipping Symlink: %s (Path was ignored)\n", extractFilename) } @@ -835,7 +835,7 @@ func extractPackage(bpmpkg *BPMPackage, verbose bool, filename, rootDir string) if ok := slices.ContainsFunc(MainBPMConfig.IgnorePaths, func(s string) bool { matched, _ := filepath.Match(s, header.Name) return matched - }); ok { + }); rootDir == "/" && ok { if verbose { fmt.Printf("Skipping Hard Link: %s (Path was ignored)\n", extractFilename) } @@ -930,7 +930,7 @@ func installPackage(filename string, installationReason InstallationReason, root if ok := slices.ContainsFunc(MainBPMConfig.IgnorePaths, func(s string) bool { matched, _ := filepath.Match(s, entry.Path) return matched - }); ok { + }); rootDir == "/" && ok { if verbose { fmt.Printf("Skipping path: %s (Path was ignored)\n", finalPath) } @@ -1183,7 +1183,7 @@ func removePackage(pkg string, verbose bool, rootDir string) error { if ok := slices.ContainsFunc(MainBPMConfig.IgnorePaths, func(s string) bool { matched, _ := filepath.Match(s, entry.Path) return matched - }); ok { + }); rootDir == "/" && ok { if verbose { fmt.Printf("Skipping path: %s (Path was ignored)\n", finalPath) }