Uploaded image for project: 'Funtoo Linux'
  1. Funtoo Linux
  2. FL-11158

Multiple Go packages failing because of non-existent source directory

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical (System) Critical (System)
    • None
    • None
    • Hide
      Multiple packages affected, e.g. `app-admin/gopass`:
      1. emerge app-admin/gopass
      2. Observe the error:

      Failed to tidy go.mod/go.sum: go: go.mod file not found in current directory or any parent directory; see 'go help modules'
      Show
      Multiple packages affected, e.g. `app-admin/gopass`: 1. emerge app-admin/gopass 2. Observe the error: Failed to tidy go.mod/go.sum: go: go.mod file not found in current directory or any parent directory; see 'go help modules'
    • This issue potentially affects many packages. The first step would be to find all packages that use the `go-module` eclass and use a `mv` in `src_unpack` or `post_src_unpack`.

      Resolving FL-11027 uncovered a common issue among various Go package ebuilds in Funtoo, caused by a pattern that appears in many other Funtoo ebuilds as a side effect of the inconsistency between the default value for `S` and the way folders in GitHub source tarballs are named. The common way to solve this inconsistency is to `mv` the unpacked folder to `${S}`, but this doesn't really work with the `go-module` eclass, as it expects `${S}` to exist during `src_unpack`.

       

      To address this, the affected ebuilds must be adjusted to set `S` properly instead of relying on a `mv`. This should be trivial for autogens which use the Metatools GitHub utilities, as `hash` is readily available in `pkginfo` and can be used to set `S`.

            invakid404 invakid404
            invakid404 invakid404
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: