Skip to content

Commit 5231b6c

Browse files
committed
slog it
1 parent 66e26ab commit 5231b6c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/ldconfig/ldconfig.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"bufio"
2222
"flag"
2323
"fmt"
24+
"log/slog"
2425
"os"
2526
"os/exec"
2627
"path/filepath"
@@ -107,13 +108,15 @@ func NewFromArgs(args ...string) (*Ldconfig, error) {
107108
}
108109

109110
func (l *Ldconfig) UpdateLDCache() error {
111+
slog.Info("UpdateLDCache pre-pivot", "config", l)
110112
ldconfigPath, err := l.prepareRoot()
111113
if err != nil {
112114
return err
113115
}
114116

115117
// `prepareRoot` pivots to the container root, so can now set the container "debian-ness".
116118
l.isDebianLikeContainer = isDebian()
119+
slog.Info("UpdateLDCache post-pivot", "config", l)
117120

118121
// Explicitly specify using /etc/ld.so.conf since the host's ldconfig may
119122
// be configured to use a different config file by default.
@@ -179,6 +182,7 @@ func (l *Ldconfig) filterDirectories(configFilePath string, directories ...strin
179182
// The file is created at /etc/ld.so.conf.d/{{ .pattern }} using `CreateTemp` and
180183
// contains the specified directories on each line.
181184
func createLdsoconfdFile(pattern string, dirs ...string) error {
185+
slog.Info("createLdsoconfdFile", "pattern", pattern, "dirs", dirs)
182186
if len(dirs) == 0 {
183187
return nil
184188
}
@@ -293,6 +297,7 @@ func processLdsoconfFile(ldsoconfFilename string) ([]string, []string, error) {
293297

294298
func isDebian() bool {
295299
info, err := os.Stat("/etc/debian_version")
300+
slog.Info("isDebian", "info", info, "err", err)
296301
if err != nil {
297302
return false
298303
}

0 commit comments

Comments
 (0)