Skip to content

Move the PEL_NO_BANNER export into the orbital mgr package after orbital v2 #808

Backlog

Description

@discount-elf

Background

When the install tree is root-owned, building an orbital `*mgr.Manager` re-invokes the CLI under sudo. To stop the re-invoked run printing the banner a second time, #807 has formae set `PEL_NO_BANNER=true` itself before each manager is built (`banner.Suppress()`, read by the gate added in #806).

That puts the export in the wrong layer. formae has to remember to call it at every site that builds a manager:

  • `internal/cli/update/update.go` (`update` and `update list`)
  • `internal/cli/refresh/refresh.go`
  • `internal/cli/clean/clean.go`
  • `internal/cli/plugin/manager.go` (`NewCLIPluginManager`, used by every `plugin` subcommand)

A new command that builds a manager and forgets the call gets the double banner back.

Proposal

Once orbital v2 lands, have the orbital `mgr` package export `PEL_NO_BANNER` as part of the sudo re-invoke, since that is the code that knows a re-invoke is about to happen. Then remove the formae-side calls.

Tasks

  • orbital (v2): set `PEL_NO_BANNER=true` in the environment of the sudo re-invoke from the `mgr` package.
  • formae: move to the orbital v2 release that includes it.
  • formae: remove the `banner.Suppress()` calls listed above, and `banner.Suppress` itself if nothing else uses it.
  • formae: confirm a command against a root-owned tree still prints the banner exactly once.

Notes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions