Bug 1004955

Summary: Publican print_unused incorrectly detects files from higher levels in the directory structure (but within the book) as unused.
Product: [Community] Publican Reporter: Stephen Gordon <sgordon>
Component: publicanAssignee: Jeff Fearn 🐞 <jfearn>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.1CC: aigao, rlandman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-19 02:46:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Reproducer none

Description Stephen Gordon 2013-09-05 20:34:52 UTC
Created attachment 794502 [details]
Reproducer

Description of problem:

Publican print_used incorrectly detects files from higher levels in the directory structure as unused (that is where they are included with a relative path such as ../).

I came across this in a real book but I've constructed a simpler example (attached as well). In this tree:

$ tree
.
├── en-US
│   ├── Author_Group.xml
│   ├── Book_Info.xml
│   ├── common
│   │   └── Chapter.xml
│   ├── images
│   │   └── icon.svg
│   ├── Preface.xml
│   ├── Revision_History.xml
│   ├── Section.xml
│   ├── Unused_Test.ent
│   └── Unused_Test.xml
└── publican.cfg

Unused_Test.xml includes common/Chapter.xml
common/Chapter.xml includes ../Section.xml

Running print_unused on this tree results in:

$ publican print_unused

List of unused XML files in en-US
   Section.xml

Removing Section.xml will however result in the book failing to build.


See also: Bug # 740417

Version-Release number of selected component (if applicable):

publican 3.2.0

How reproducible:

Reproducer attached.

Actual results:

Section.xml is listed as unused.

Expected results:

Section.xml and other files include from paths earlier in the tree (but still within the book) should not be listed as unused.

Comment 2 HSS Product Manager 2013-09-24 03:17:31 UTC
HSS-QE has reviewed and declined this request. QE for this bug will be handled by IED.

Comment 3 Jeff Fearn 🐞 2013-09-24 04:15:46 UTC
To ssh://git.fedorahosted.org/git/publican.git
   2097c0f..9202cbd  HEAD -> devel

Comment 4 Ruediger Landmann 2013-10-21 03:49:03 UTC
Verified on publican-3.9.9-0.fc19.t16.noarch