import os

from genes.alpine.traits import only_alpine
from genes.lib.logging import log_error
from genes.process.commands import get_env_run

env_run = get_env_run(os.environ.copy())


@only_alpine()
def add(*packages) -> None:
    if packages:
        env_run('apk --no-cache add'.split() + list(packages))
    else:
        msg = 'Missing packages argument'
        log_error(msg)
        raise ValueError(msg)

@@ -399,16 +399,238 @@
 ValueError(msg)%0A
+%0A%0A@only_alpine()%0Adef delete(*packages) -%3E None:%0A    if packages:%0A        env_run('apk del'.split() + list(packages))%0A    else:%0A        msg = 'Missing packages argument'%0A        log_error(msg)%0A        raise ValueError(msg)%0A

Add alpine delete