Skip to content

Commit 426c852

Browse files
committed
Do not report repository info in upgradable packages
1 parent 9637e89 commit 426c852

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

apt.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,14 @@ func ListUpgradable() ([]*Package, error) {
8383
if len(matches) == 0 {
8484
continue
8585
}
86+
87+
// Remove repository information in name
88+
// example: "libgweather-common/zesty-updates,zesty-updates"
89+
// -> "libgweather-common"
90+
name := strings.Split(matches[0][1], "/")[0]
91+
8692
res = append(res, &Package{
87-
Name: matches[0][1],
93+
Name: name,
8894
Status: "upgradable",
8995
Version: matches[0][2],
9096
Architecture: matches[0][3],

0 commit comments

Comments
 (0)