editprep

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package editprep connects immutable Git sources to Portfile editing.

Service materializes disposable snapshots, resolves and rechecks upstream releases, invokes macports/portedit, and stores the edited tree as Git objects. It re-evaluates that stored candidate before returning edits and commit intent. Its Result is the editor's whole, with the edits as Git file edits; the engine writes them into a branch's working files, and tidy commits them.

Index

Constants

View Source
const (
	GoToolchainCovered    = portedit.GoToolchainCovered
	GoToolchainRaised     = portedit.GoToolchainRaised
	GoToolchainUndeclared = portedit.GoToolchainUndeclared
	GoToolchainByHand     = portedit.GoToolchainByHand
	GoToolchainUnchecked  = portedit.GoToolchainUnchecked
)

Variables

View Source
var ErrFidelity = portedit.ErrFidelity
View Source
var ErrUnsupported = portedit.ErrUnsupported

Functions

This section is empty.

Types

type ArchivePair

type ArchivePair = portedit.ArchivePair

type ChecksumLeft added in v0.4.0

type ChecksumLeft = portedit.ChecksumLeft

ChecksumLeft is what a checksum refresh left as it was, with why.

type ChecksumsToWrite

type ChecksumsToWrite = portedit.ChecksumsToWrite

type CommitIntent

type CommitIntent = portedit.CommitIntent

type GoToolchain

type GoToolchain = portedit.GoToolchain

type GoToolchainOutcome

type GoToolchainOutcome = portedit.GoToolchainOutcome

type MirrorConflict added in v0.4.0

type MirrorConflict = portedit.MirrorConflict

MirrorConflict is an archive MacPorts' mirror holds another file of.

type MovedSource added in v0.8.0

type MovedSource = portedit.MovedSource

type Override

type Override = portedit.Override

Override is a crate a Portfile pinned over its lock, which an update dropped once the new lock moved past it.

type Regenerated

type Regenerated = portedit.Regenerated

type Request

type Request = portedit.Request

type Result

type Result struct {
	portedit.Result
	PreparedTree model.ObjectID
	Files        []git.FileEdit
	// HTTPS are the port's plain-HTTP links the edit switched to https,
	// which answered there (Request.HTTPS).
	HTTPS []macports.PlainURL
}

Result is the editor's result, carried whole, with its files as Git edits of the source tree and the tree they make. Prepared is bound to the committed tree's source identity once the candidate is written, and Commits wait for the second upstream check.

func (Result) MissingWorksrcdir added in v0.8.0

func (r Result) MissingWorksrcdir() string

MissingWorksrcdir is the worksrcdir the candidate source doesn't hold, which its patches were checked without; empty where it holds it.

func (Result) PatchProblems

func (r Result) PatchProblems() []string

PatchProblems names the declared patches that no longer apply to the candidate source.

func (Result) PatchesApplied

func (r Result) PatchesApplied() int

PatchesApplied counts the declared patches that apply to the candidate source, checked: fluent-bit's six applied, and nothing said so, so the person dry-ran them by hand (the fluent-bit run, batch 23).

func (Result) UncheckedPatches

func (r Result) UncheckedPatches() []string

UncheckedPatches names the declared patches no check reached before the build, which applies them: a git-fetched port's, whose source isn't extracted here, or ones outside the source directory.

type Service

type Service struct {
	Repo            *git.Repository
	Ports           macports.Evaluator
	Upstream        *upstream.Service
	DependencyTools depblock.Tools
	// PatchTools are the diff and patch a port's patches are checked with.
	PatchTools patchcheck.Tools
	HTTP       *http.Client
	// Mirror is where an archive upstream no longer serves as its Portfile
	// declares it is fetched from, archives.MacPortsMirror in use; none
	// when empty.
	Mirror string
	// Workspaces hands out one projection per source; nil opens one per
	// preparation.
	Workspaces *workspace.Registry
}

func (*Service) Prepare

func (s *Service) Prepare(ctx context.Context, request Request) (_ Result, err error)

func (*Service) ResolveRelease

func (s *Service) ResolveRelease(ctx context.Context, request Request) (_ model.Release, err error)

type SourceMode added in v0.8.0

type SourceMode = portedit.SourceMode

SourceMode is what a version update does about a GitHub port's source; MovedSource is the move it made.

type Stealth

type Stealth = portedit.Stealth

type StealthDistfile

type StealthDistfile = portedit.StealthDistfile

type StealthRequest

type StealthRequest = portedit.StealthRequest

type Unlocated

type Unlocated = distfiles.Unlocated

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL