Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 0.7.12
-
Fix Version/s: 0.7.14
-
Component/s: None
-
Labels:None
-
Environment:
anything with dpkg
Description
dpkg provider doesn't correctly set @current_resource.package_name in #load_current_resource when the package name contains a dash (a plus character would probably also fail). This happens because the regex used to extract the package name from the output of dpkg -s doesn't accept those characters. From IBM's page on debian packages:
( http://www.ibm.com/developerworks/linux/library/l-debpkg.html )
The name of the package itself (not the filename, just the name of the package) can contain lowercase letters, numbers, and the "-" and "" characters. (It might sound odd for a package to have a "" in the package name, but it is used for several packages like "doc+" – a documentation system for C/C+ code.) So, "mypackage-2++" is a perfectly valid package name, while "MY_Package" or "mypackage2.0" would not be.
See the error in action at https://gist.github.com/0fe1cdb9445f108601d7
Solution is to change the regexp.
Activity
- All
- Comments
- History
- Activity
- Transitions Summary