Removed some unused functions
This commit is contained in:
parent
9cbc36f869
commit
eae1e05102
@ -56,11 +56,3 @@ func stringSliceRemoveEmpty(s []string) []string {
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
func byteArrayToString(bs []byte) string {
|
||||
b := make([]byte, len(bs))
|
||||
for i, v := range bs {
|
||||
b[i] = v
|
||||
}
|
||||
return string(b)
|
||||
}
|
||||
|
@ -1277,24 +1277,6 @@ func GetPackageInfo(pkg, rootDir string, defaultValues bool) *PackageInfo {
|
||||
return info
|
||||
}
|
||||
|
||||
func setPackageInfo(pkg, contents, rootDir string) error {
|
||||
installedDir := path.Join(rootDir, "var/lib/bpm/installed/")
|
||||
pkgDir := path.Join(installedDir, pkg)
|
||||
info := path.Join(pkgDir, "info")
|
||||
if _, err := os.Stat(installedDir); os.IsNotExist(err) {
|
||||
return err
|
||||
}
|
||||
if _, err := os.Stat(pkgDir); os.IsNotExist(err) {
|
||||
return err
|
||||
}
|
||||
bs := []byte(contents)
|
||||
err := os.WriteFile(info, bs, 0644)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func RemovePackage(pkg, rootDir string) error {
|
||||
installedDir := path.Join(rootDir, "var/lib/bpm/installed/")
|
||||
pkgDir := path.Join(installedDir, pkg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user