MCPcopy Index your code
hub / github.com/jetify-com/devbox / needsGlibcPatch

Method needsGlibcPatch

internal/patchpkg/builder.go:263–278  ·  view source on GitHub ↗
(file *bufio.Reader, filePath string)

Source from the content-addressed store, hash-verified

261}
262
263func (d *DerivationBuilder) needsGlibcPatch(file *bufio.Reader, filePath string) bool {
264 if d.Glibc == "" || d.glibcPatcher == nil {
265 return false
266 }
267 if path.Dir(filePath) != "bin" {
268 return false
269 }
270
271 // ELF binaries are identifiable by the first 4 magic bytes:
272 // 0x7F E L F
273 magic, err := file.Peek(4)
274 if err != nil {
275 return false
276 }
277 return magic[0] == 0x7F && magic[1] == 'E' && magic[2] == 'L' && magic[3] == 'F'
278}
279
280func (d *DerivationBuilder) findRemovedRefs(ctx context.Context, pkg *packageFS) ([]fileSlice, error) {
281 var refs []fileSlice

Callers 1

copyFileMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected