mirror of
https://github.com/gogrlx/snack.git
synced 2026-04-02 05:08:42 -07:00
Add IsHeld method to Holder interface and implement in apt/dnf backends
Co-authored-by: taigrr <8261498+taigrr@users.noreply.github.com>
This commit is contained in:
@@ -124,6 +124,11 @@ func (a *Apt) ListHeld(ctx context.Context) ([]snack.Package, error) {
|
||||
return listHeld(ctx)
|
||||
}
|
||||
|
||||
// IsHeld reports whether a specific package is currently held.
|
||||
func (a *Apt) IsHeld(ctx context.Context, pkg string) (bool, error) {
|
||||
return isHeld(ctx, pkg)
|
||||
}
|
||||
|
||||
// Autoremove removes packages no longer required as dependencies.
|
||||
func (a *Apt) Autoremove(ctx context.Context, opts ...snack.Option) error {
|
||||
a.Lock()
|
||||
|
||||
Reference in New Issue
Block a user