puppet-python
puppet-python copied to clipboard
pip on Debian 6 doesn't support version argument
The custom pip_version.rb fact fails on Debian 6 with "Error: Facter: error while resolving custom fact "pip_version": undefined method `[]' for nil:NilClass" when python-pip package is installed (version 0.7.2-1). This is because this version on pip doesn't support the --version argument.
Similarly on Ubuntu 16.04 which has python version 2.7.11+, yes PLUS (apparently its that awesome), we get the same undefined method error.
It looks as if the regex to pull out the version does not handle the trailing information. One way it could be fixed is to remove the end of line anchor or if we want the plus adjust the regex to pull that in
I think I like option one.. no plus.
Well, the plus is there in that case to indicate it's a version after 2.7.11 pulled from upstream's version control. So it does have some sort of meaning.
But, more generally, perhaps all of this family of facts should do something more helpful than an internal ruby error, if the output doesn't match a regexp?