PackageManager just because
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.3 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. package Variables
  2. import (
  3. "os"
  4. "sync"
  5. )
  6. const (
  7. DatabaseName string = "package_manager.db"
  8. FsHashDatabaseName string = "fs_hash.db"
  9. )
  10. var (
  11. WG sync.WaitGroup
  12. VerboseOutput bool = false
  13. RootDir string = "/"
  14. FsHashPicksBucket []byte = []byte("FilesystemPicks")
  15. FsHashIndexBucket []byte = []byte("FilesystemIndex")
  16. PruneRegexPaths []string = []string{
  17. "^/\\.git$",
  18. "^/dist$",
  19. "^/boot/grub$",
  20. "^/proc$",
  21. "^/dev$",
  22. "^/mnt$",
  23. "^/sys$",
  24. "^/src$",
  25. "^/root$",
  26. "^/home$",
  27. "^/build$",
  28. "^/tools$",
  29. "^/run/user$",
  30. "^/usr/share/zoneinfo-leaps$",
  31. "^/usr/share/zoneinfo$",
  32. "^/usr/share/zsh$",
  33. "^/tmp$",
  34. "^/var/db$",
  35. "^/var/cache$",
  36. "^/var/log$",
  37. "^/var/spool$",
  38. "^/var/lib/texmf$",
  39. "^/var/lib/postgres$",
  40. "^/var/lib/pacman$",
  41. "^/var/lib/NetworkManager$",
  42. "^/var/lib/systemd$",
  43. "^/var/lib/xkb/README.compiled$",
  44. "/lost\\+found$",
  45. }
  46. IgnoreRegexPaths []string = []string{
  47. "^/swapfile$",
  48. "^/etc/passwd$",
  49. "^/etc/passwd-$",
  50. "^/etc/group$",
  51. "^/etc/group-$",
  52. "^/var/.updated$",
  53. "^/var/lib/mlocate/mlocate.db$",
  54. "^/var/lib/krb5kdc/kdc.conf$",
  55. "^/var/lib/alsa/asound.state$",
  56. }
  57. )
  58. func init() {
  59. var (
  60. rootDir string
  61. )
  62. rootDir = os.Getenv("ROOTDIR")
  63. if rootDir != "" {
  64. RootDir = rootDir
  65. }
  66. }