Portage supports a function, depclean, which removes old dependencies.
If a package is provided, emerge will only remove it if no other package
depends on it.
We do a proper length check when using the sockets in IPC mode and fail when it reaches 103 which is the lower value for this error on BSD systems, Linux and Solaris is 107. We just exit the master/minion since continuing would mean leaving it crippled.
The encoded string now looks like:
```python
import os, sys
if 'VIRTUAL_ENV' in os.environ:
ve_dir = os.environ['VIRTUAL_ENV']
ve_dir in sys.path or sys.path.insert(0, ve_dir)
activate_this = os.path.join(os.path.join(ve_dir, 'bin'), 'activate_this.py')
# Fix for windows
if not os.path.exists(activate_this):
activate_this = os.path.join(os.path.join(ve_dir, 'Scripts'), 'activate_this.py')
execfile(activate_this, dict(__file__=activate_this))
```
Include the current active virtualenv into pylint's init-hook.
The `base64` encoded string is:
```python
import sys, os
if 'VIRTUAL_ENV' not in os.environ:
sys.exit(0)
ve_dir = os.environ['VIRTUAL_ENV']
ve_dir in sys.path or sys.path.insert(0, ve_dir)
activate_this = os.path.join(os.path.join(ve_dir, 'bin'), 'activate_this.py')
if not os.path.exists(activate_this):
activate_this = os.path.join(os.path.join(ve_dir, 'Scripts'), 'activate_this.py')
execfile(activate_this, dict(__file__=activate_this))
```
* Fixed the `brew` and `sysbench` modules which were returning `None` instead of `False`.
* Additionally, regarding the module `sysbench`, @sharan-monikantan, why are the parsed returned keys white-space padded?
I noticed earlier tonight when I added some information to the "hacking"
docs that my "root_dir" and "sock_dir" links were not actually linking
to anything, and found that they were missing from the minion
configuration page. It turns out that there were a good many params that
hadn't made their way into the docs yet, so I added as many of them as
I could identify.
* On some occasions it seems that `salt.utils.event.SaltEvent.destroy()` is called twice and the errors exhibited on #3015 would show up on the second time we would try to set the linger socket option since that socket was already closed. So, even though on some parts of code which I changed in this commit weren't giving any problems, I ended up using the same recipe all around, if the socket is open, set the linger option and close it, plus, if open, also close the context.
Platform-specific code from #3019 has been moved to pkg_resource module.
This code may evolve a bit down the road. Presently it will only check
syntax if the package is coming from the portage tree via ebuild.
However, future support for entropy (binary pkg manager), as well as
expanding syntax checking for binary package files should be considered
TODO items.