We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c64433 commit 807c313Copy full SHA for 807c313
1 file changed
dagger/maintenance/updatelibs.go
@@ -10,8 +10,8 @@ import (
10
)
11
12
// libsRegex matches library dependencies from apt-get output
13
-// Format: library-name MD5Sum:checksum
14
-var libsRegex = regexp.MustCompile(`(?m)^.*\s(lib\S*).*(MD5Sum:.*)$`)
+// Format: 'url' library-name size [MD5Sum:checksum]
+var libsRegex = regexp.MustCompile(`(?m)^.*\s(lib\S+\.deb)\s+\d+\s*(MD5Sum:\S+)?`)
15
16
func updateOSLibsOnTarget(
17
ctx context.Context,
@@ -43,8 +43,12 @@ func updateOSLibsOnTarget(
43
44
var result string
45
for _, m := range matches {
46
- if len(m) >= 3 {
47
- result += m[1] + " " + m[2] + "\n"
+ if len(m) >= 2 {
+ line := m[1]
48
+ if len(m) >= 3 && m[2] != "" {
49
+ line += " " + m[2]
50
+ }
51
+ result += line + "\n"
52
}
53
54
0 commit comments