There hasn't been an update to packages since 7/24
updater_1 | INFO: 2021/07/24 19:40:40 commit.go:29: Finished updating commits updater_1 | INFO: 2021/07/24 19:45:36 soko.go:55: Updating package data updater_1 | INFO: 2021/07/24 19:45:36 update.go:31: Start update... updater_1 | INFO: 2021/07/24 19:45:40 update.go:60: Start updating changed metadata updater_1 | INFO: 2021/07/24 19:45:40 update.go:80: Start updating changed package data updater_1 | INFO: 2021/07/24 19:45:40 update.go:98: Start updating the history updater_1 | INFO: 2021/07/24 19:45:40 commit.go:22: Start updating commits updater_1 | INFO: 2021/07/24 19:45:40 commit.go:29: Finished updating commits updater_1 | INFO: 2021/07/24 19:50:36 soko.go:55: Updating package data updater_1 | INFO: 2021/07/24 19:50:36 update.go:31: Start update... updater_1 | INFO: 2021/07/24 19:50:40 update.go:60: Start updating changed metadata updater_1 | INFO: 2021/07/24 19:50:40 mask.go:52: Updating Masks updater_1 | panic: runtime error: slice bounds out of range [1:0] updater_1 | updater_1 | goroutine 1 [running]: updater_1 | soko/pkg/portage/repository.parsePackageMask(0xc00064a6dd, 0x199) updater_1 | /go/src/soko/pkg/portage/repository/mask.go:115 +0x853 updater_1 | soko/pkg/portage/repository.UpdateMask(0xc0001c4a83, 0x17) updater_1 | /go/src/soko/pkg/portage/repository/mask.go:59 +0x16e updater_1 | soko/pkg/portage.updateMetadata() updater_1 | /go/src/soko/pkg/portage/update.go:66 +0xf5 updater_1 | soko/pkg/portage.Update() updater_1 | /go/src/soko/pkg/portage/update.go:36 +0x104 updater_1 | main.main() updater_1 | /go/src/soko/soko.go:56 +0x928
// parse the package.mask entries and // update the Mask table in the database func parsePackageMask(packageMask string) { packageMaskLines := strings.Split(packageMask, "\n") if len(packageMaskLines) >= 3 { packageMaskLine, packageMaskLines := packageMaskLines[0], packageMaskLines[1:] author, authorEmail, date := parseAuthorLine(packageMaskLine) reason := "" packageMaskLine, packageMaskLines = packageMaskLines[0], packageMaskLines[1:] for strings.HasPrefix(packageMaskLine, "#") { reason = reason + " " + strings.Replace(packageMaskLine, "# ", "", 1) packageMaskLine, packageMaskLines = packageMaskLines[0], packageMaskLines[1:] } packageMaskLines = append(packageMaskLines, packageMaskLine) for _, version := range packageMaskLines { useflag := &models.Mask{ Author: author, AuthorEmail: authorEmail, Date: date, Reason: reason, Versions: version, } _, err := database.DBCon.Model(useflag).OnConflict("(versions) DO UPDATE").Insert() if err != nil { logger.Error.Println("Error while inserting/updating package mask entry") logger.Error.Println(err) } } } }
func parsePackageMask(packageMask string) { // Split the mask entry into lines packageMaskLines := strings.Split(packageMask, "\n") // If there are at least 3 lines if len(packageMaskLines) >= 3 { // Extract the header line, plus the rest. packageMaskLine, packageMaskLines := packageMaskLines[0], packageMaskLines[1:] author, authorEmail, date := parseAuthorLine(packageMaskLine) reason := "" // Walk the non-header lines; while they are #-prefixed, append them to the reason. // Eventually we should hit a terminating \n and the for loop should terminate. packageMaskLine, packageMaskLines = packageMaskLines[0], packageMaskLines[1:] for strings.HasPrefix(packageMaskLine, "#") { reason = reason + " " + strings.Replace(packageMaskLine, "# ", "", 1) packageMaskLine, packageMaskLines = packageMaskLines[0], packageMaskLines[1:] } packageMaskLines = append(packageMaskLines, packageMaskLine) for _, version := range packageMaskLines { useflag := &models.Mask{ Author: author, AuthorEmail: authorEmail, Date: date, Reason: reason, Versions: version, } _, err := database.DBCon.Model(useflag).OnConflict("(versions) DO UPDATE").Insert() if err != nil { logger.Error.Println("Error while inserting/updating package mask entry") logger.Error.Println(err) } } } } So the bug here appears to be that getMasks is returning things without terminating \n's? https://gitweb.gentoo.org/repo/gentoo.git/commit/profiles/package.mask?id=39e5e3ae11c6ff4775afcb582846bb33f54d66a3 Produces a mask with no atoms, which would probably trigger this bug.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6bdc6bf035ea471bf1463333cf8c2543a34233f6 commit 6bdc6bf035ea471bf1463333cf8c2543a34233f6 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-07-28 00:16:01 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-07-28 00:16:54 +0000 profiles: drop commented out virtual/perl-Pod-Parser mask Breaks packages.gentoo.org parsing and pkgdev. We know where to find the mask in git history when we want to restore it. Bug: https://bugs.gentoo.org/804681 Signed-off-by: Sam James <sam@gentoo.org> profiles/package.mask | 10 ---------- 1 file changed, 10 deletions(-)
updater_1 | INFO: 2021/07/28 00:20:36 soko.go:55: Updating package data updater_1 | INFO: 2021/07/28 00:20:36 update.go:31: Start update... updater_1 | INFO: 2021/07/28 00:20:40 update.go:60: Start updating changed metadata updater_1 | INFO: 2021/07/28 00:20:40 mask.go:52: Updating Masks updater_1 | INFO: 2021/07/28 00:20:40 update.go:80: Start updating changed package data updater_1 | INFO: 2021/07/28 00:20:41 update.go:98: Start updating the history updater_1 | INFO: 2021/07/28 00:20:41 commit.go:22: Start updating commits updater_1 | INFO: 2021/07/28 00:20:43 commit.go:133: Processed commits: 0 updater_1 | INFO: 2021/07/28 00:20:43 commit.go:136: Processed first commit. updater_1 | INFO: 2021/07/28 00:21:05 commit.go:133: Processed commits: 1000 updater_1 | INFO: 2021/07/28 00:21:15 commit.go:29: Finished updating commits