FS#44408 - [perl-xml-libxml] post_upgrade broken

Attached to Project: Arch Linux
Opened by xduugu (xduugu) - Tuesday, 31 March 2015, 06:31 GMT
Last edited by Eric Belanger (Snowman) - Friday, 03 April 2015, 23:44 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Eric Belanger (Snowman)
Andreas Radke (AndyRTR)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The post_upgrade function uses grep on ParserDetails.ini to check if the xml parsers need to get installed. If grep returns "0" hits, it executes two commands to install them. Since the ParserDetails.ini file is not part of the package and apparently was just recently introduced, the file may no exists and therefore the grep command returns an error message and, instead of a number of hits, an empty string. In the end, the parsers are not installed on systems where this file does not already exist.

[2015-03-30 08:45] [ALPM] upgraded perl-xml-libxml (2.0117-1 -> 2.0118-2)
[2015-03-30 08:45] [ALPM-SCRIPTLET] grep: /usr/share/perl5/vendor_perl/XML/SAX/ParserDetails.ini: No such file or directory


Solution: add an additional check if the file exists. See attached file as example.

Additional info:
* perl-xml-libxml 2.0118-2


Steps to reproduce:
This task depends upon

Closed by  Eric Belanger (Snowman)
Friday, 03 April 2015, 23:44 GMT
Reason for closing:  Fixed
Additional comments about closing:  perl-xml-libxml-2.0118-3

Loading...