experiencing races on many arches with golang-go 1.20 in mantic

Bug #2022074 reported by Dimitri John Ledkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
golang-1.20 (Ubuntu)
New
Undecided
Unassigned
zsys (Ubuntu)
New
Undecided
Unassigned

Bug Description

# run go generate for only installed generated assets
go generate -ldflags=-X=github.com/ubuntu/zsys/internal/config.Version=0.5.10.1 --mod=vendor ./...
writing internalassets_vfsdata.go
2023/06/01 13:46:13 Error when generating mo files: couldn't compile mo file from "../../po/de.po": exit status 1.
Command output: msgfmt: error while opening "/<<PKGBUILDDIR>>/debian/zsys/usr/share/locale/de/LC_MESSAGES/zsys.mo" for writing: Not a directory
exit status 1
internal/i18n/i18n.go:9: running "go": exit status 1

Is shocking given it just does this:

 if err := generators.CleanDirectory(baseLocaleDir); err != nil {
  log.Fatalln(err)
 }

....
  if err := os.MkdirAll(outDir, 0755); err != nil {
   return fmt.Errorf("couldn't create %q: %v", out, err)
  }
  if out, err := exec.Command("msgfmt",
   "--output-file="+filepath.Join(outDir, config.TEXTDOMAIN+".mo"),
   candidate).CombinedOutput(); err != nil {
   return fmt.Errorf("couldn't compile mo file from %q: %v.\nCommand output: %s", candidate, err, out)
  }

meaning it deleted dirs, created dirs, and yet couldn't write to said dir.

https://github.com/ubuntu/zsys/blob/master/internal/i18n/generate-locales.go#L194

almost as if mkdirall stopped being atomic?

Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

retries make it work.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.