You are not logged in.

#1 2016-11-21 15:27:15

beka
Member
Registered: 2016-11-21
Posts: 2

Using pacman for isolated dev environments

Hi,

As a programmer, it is useful to have isolated development environments so resources don't get mix up (e.g. when in project X you need a package from one version and in project Y you need a different version of the same package). It is also useful to try things in isolation, without "contaminating" your system with un-needed packages later on (you can of course remove, but then you need to do some manual book-keeping).

For python packages there are plenty of options for such isolated environments (pip, conda), but there is no system-wide option available. Docker and VMs are options, but have their (thorny) disadvantages.

I was wondering whether it would be possible to create a virtual environment based on pacman:
1) create an environment directory, e.g. ~/envs/projectX/, with bin/lib/var directories
2) when using the enviroment, add the custom bin/lib dirs to PATH and LD_LIBRARY_PATH etc.
3) when active inside the environment, use pacman -r ~/envs/projectX as default

I haven't found this idea expressed anywhere, so I thought this forum is a good place to ask if it's possible at all, or has been done.

Thanks,
Beka

Offline

#2 2016-11-21 15:35:25

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: Using pacman for isolated dev environments

https://wiki.archlinux.org/index.php/De … ean_Chroot  ?

Edit: BTW,  Welcome to the Arch Linux forums big_smile

Last edited by ewaller (2016-11-21 15:35:55)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2016-11-21 18:16:06

beka
Member
Registered: 2016-11-21
Posts: 2

Re: Using pacman for isolated dev environments

Thanks for the response and welcome smile

It is indeed interesting, and can be used in some cases (where all of the data is under these folders), but not in others.
Preventing access to all other data is too harsh a restriction - e.g. I will probably have git and gcc installed globally and would like to use them (unless I specifically install other version inside the environment).

Offline

Board footer

Powered by FluxBB