Bug 740417
Summary: | print_unused returns files included using relative paths as unused | ||
---|---|---|---|
Product: | [Community] Publican | Reporter: | Stephen Gordon <sgordon> |
Component: | publican | Assignee: | Jeff Fearn 🐞 <jfearn> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Ruediger Landmann <rlandman+disabled> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 2.7 | CC: | mhideo, misty, rlandman+disabled |
Target Milestone: | 3.0 | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | 3.0.0 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-10-31 03:10:52 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Stephen Gordon
2011-09-22 00:50:42 UTC
Made file check ignore leading './' Applied change to branches/publican-2x and trunk. Committed revision 1913. "publican print_unused" still returns unused files when they are included via a relative path. See example: en-US]$ rpm -q publican publican-3.0-0.fc16.t166.noarch en-US]$ ls testchapter.xml testchapter.xml en-US]$ grep testchapter book.xml <xi:include href="testchapter.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> [mprpic@fedora en-US]$ cd .. [mprpic@fedora book]$ publican print_unused No unused XML files [mprpic@fedora book]$ cd en-US/ ... [mprpic@fedora en-US]$ grep testchapter book.xml <xi:include href="./testchapter.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> [mprpic@fedora en-US]$ cd .. [mprpic@fedora book]$ publican print_unused List of unused XML files in en-US testchapter.xml Ah the bug was about files in the main directory including files in sub directories generated false positives; the feedback was that files in nested directories including files in deeper directories also triggers false positives. Fixed print_unused & print_tree to correctly handled deeply nested includes. To ssh://git.fedorahosted.org/git/publican.git 40d48c4..5000dcf master -> master create a book that xi includes files from a subdirectory. run print_unused. verify if files do not come up as unused. Testing on publican-3.0-0.fc17.t179.noarch it appears this is still an issue. $ publican print_unused List of unused XML files in en-US topics/References/RHEL/6/RHEVH/Support_Limits_List.xml topics/References/RHEV/2.3/Active_Directory.xml topics/References/RHEV/2.3/Admin_Client_Requirements.xml topics/References/RHEV/2.3/Configuration_Tool.xml topics/References/RHEV/2.3/Directory_Firewall_Requirements.xml topics/References/RHEV/2.3/Host_Firewall_Requirements.xml topics/References/RHEV/2.3/ISO_Uploader.xml topics/References/RHEV/2.3/Log_Collector.xml topics/References/RHEV/2.3/Log_Files.xml topics/References/RHEV/2.3/Manage_Domains.xml topics/References/RHEV/2.3/Manager_Firewall_Requirements.xml topics/References/RHEV/2.3/Manager_Requirements.xml topics/References/RHEV/2.3/RHEV_and_RHEL_Compatibility.xml topics/References/RHEV/2.3/Required_Channels.xml topics/References/RHEV/2.3/Supported_Guests.xml topics/References/RHEV/2.3/UIDs_needed_by_RHEV.xml topics/Tasks/IPA/Adding_New_Users.xml topics/Tasks/RHEV/Adding_FCP_Storage.xml topics/Tasks/RHEV/Adding_Local_Storage.xml topics/Tasks/RHEV/Adding_NFS_Storage.xml topics/Tasks/RHEV/Adding_iSCSI_Storage.xml topics/Tasks/RHEV/Preparing_Red_Hat_Enterprise_Linux_Hosts.xml topics/Tasks/RHEV/Red_Hat_Network_Subscription.xml topics/Tasks/RHEV/Removing_Red_Hat_Enterprise_Virtualization_Manager.xml $ grep 'topics/References/RHEL/6/RHEVH/Support_Limits_List.xml' en-US/*.xml en-US/Requirements.xml: <xi:include href="./topics/References/RHEL/6/RHEVH/Support_Limits_List.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> This is a corner case where people have the optional leading './'. Because the xml_file list doesn't have it the pattern match comparing used files to existing files wasn't matching. Added extra check for the './' version. To ssh://git.fedorahosted.org/git/publican.git 8830412..8c64c85 master -> master I checked out Steve's test book and ran the command: [mstanley@timtam Installation_Guide]$ publican print_unused No unused XML files Marking this as verified. I checked out Steve's test book and ran the command: [mstanley@timtam Installation_Guide]$ publican print_unused No unused XML files Marking this as verified. |