File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ import (
1010)
1111
1212// libsRegex matches library dependencies from apt-get output
13- // Format: library-name MD5Sum:checksum
14- var libsRegex = regexp .MustCompile (`(?m)^.*\s(lib\S*). *(MD5Sum:.*)$ ` )
13+ // Format: 'url' library-name size [ MD5Sum:checksum]
14+ var libsRegex = regexp .MustCompile (`(?m)^.*\s(lib\S+\.deb)\s+\d+\s *(MD5Sum:\S+)? ` )
1515
1616func updateOSLibsOnTarget (
1717 ctx context.Context ,
@@ -43,8 +43,12 @@ func updateOSLibsOnTarget(
4343
4444 var result string
4545 for _ , m := range matches {
46- if len (m ) >= 3 {
47- result += m [1 ] + " " + m [2 ] + "\n "
46+ if len (m ) >= 2 {
47+ line := m [1 ]
48+ if len (m ) >= 3 && m [2 ] != "" {
49+ line += " " + m [2 ]
50+ }
51+ result += line + "\n "
4852 }
4953 }
5054
You can’t perform that action at this time.
0 commit comments