Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
attilammagyar opened this issue Nov 19, 2015 · 1 comment
Open

Comments

@attilammagyar
Copy link
Contributor

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.

@nyirog
Copy link
Collaborator

nyirog commented Nov 20, 2015

The Action.popen shoud be extended to handle extra aliases, instead of the PATH workaround.
By the way we don't use any command from the virtuaenv right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants