Skip to content

should run apt and dpkg entirely jailed inside the virtualenv #1

@attilammagyar

Description

@attilammagyar

Just a note before I completely forget it:

It would be cleaner to get apt and dpkg not to use any global state. As we've already found out, apt can be told to manage some of its state and configuration from customized files and directories, e.g.:

apt-get \
    -o 'Dir::Etc::SourceList=...' \
    -o 'Dir::Etc::SourceParts=...' \
    -o 'Dir::Etc::Main=...' \
    -o 'Dir::Etc::Parts=...' \
    -o 'Dir::Etc::Preferences=...' \
    -o 'Dir::Etc::PreferencesParts=...' \
    -o 'Dir::State::Lists=...' \
    -o 'Dir::Cache::Archives=...' \
    -o 'Debug::NoLocking=1' \
    --allow-unauthenticated \
    --yes \
        install ...

The problem is if apt runs dpkg without passing a --root option. We might be able to workaround that by putting a wrapper inside the virtualenv's bin directory with the name dpkg which would invoke the real dpkg with passing the required options.

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