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.

76 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. "^/opt$",
  30. "^/run/user$",
  31. "^/usr/share/zsh$",
  32. "^/usr/share/texmf-dist$",
  33. "^/usr/share/zoneinfo$",
  34. "^/usr/share/zoneinfo-leaps$",
  35. "^/tmp$",
  36. "^/var/db$",
  37. "^/var/cache$",
  38. "^/var/log$",
  39. "^/var/spool$",
  40. "^/var/lib/texmf$",
  41. "^/var/lib/postgres$",
  42. "^/var/lib/pacman$",
  43. "^/var/lib/NetworkManager$",
  44. "^/var/lib/systemd$",
  45. "^/var/lib/xkb/README.compiled$",
  46. "/lost\\+found$",
  47. }
  48. IgnoreRegexPaths []string = []string{
  49. "^/swapfile$",
  50. "^/etc/passwd$",
  51. "^/etc/passwd-$",
  52. "^/etc/group$",
  53. "^/etc/group-$",
  54. "^/var/.updated$",
  55. "^/var/lib/mlocate/mlocate.db$",
  56. "^/var/lib/krb5kdc/kdc.conf$",
  57. "^/var/lib/alsa/asound.state$",
  58. "^/run/systemd/journal/kernel-seqnum$",
  59. }
  60. )
  61. func init() {
  62. var (
  63. rootDir string
  64. )
  65. rootDir = os.Getenv("ROOTDIR")
  66. if rootDir != "" {
  67. RootDir = rootDir
  68. }
  69. }