diff options
Diffstat (limited to 'installpkg.go')
-rw-r--r-- | installpkg.go | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/installpkg.go b/installpkg.go index 479b318..488692e 100644 --- a/installpkg.go +++ b/installpkg.go @@ -65,11 +65,13 @@ type InstallPkgFlags struct { TerseLength int Warn bool - chown bool - chmod bool + chown bool + chmod bool + Strict bool } var DefaultInstallPkgFlags = InstallPkgFlags{ + // Official slackware configuration Ask: false, InfoBox: false, LockDir: InstallLockDir, @@ -83,8 +85,10 @@ var DefaultInstallPkgFlags = InstallPkgFlags{ TerseLength: DefaultTerseLength, Warn: false, - chown: true, - chmod: true, + // ours + chown: false, + chmod: false, + Strict: true, } func (s *InstallPkgFlags) SetEnvValues() { @@ -97,6 +101,10 @@ func (s *InstallPkgFlags) SetEnvValues() { if v := os.Getenv("ROOT"); v != "" { s.Root = v } + + if v := os.Getenv("PKGTOOLS_GO_STRICT"); v != "NO" { + s.Strict = false + } } func runInstallScript( @@ -301,9 +309,10 @@ func extractSlackwarePkg(flags *InstallPkgFlags, fp string) error { defer slackPkg.Close() toRoot := NewTarExtractor(&TarCfg{ - Root: flags.Root, - Chmod: flags.chmod, - Chown: flags.chown, + Root: flags.Root, + Chmod: flags.chmod, + Chown: flags.chown, + Strict: flags.Strict, }) err = FilterTar( |