Bug 724850

Summary: RFE: print_unused images?
Product: [Community] Publican Reporter: Stephen Gordon <sgordon>
Component: publicanAssignee: Jeff Fearn 🐞 <jfearn>
Status: CLOSED CURRENTRELEASE QA Contact: Ruediger Landmann <rlandman+disabled>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: futureCC: mmcallis, publican-list
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:11:33 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:
Bug Depends On:    
Bug Blocks: 820023    

Description Stephen Gordon 2011-07-22 01:18:17 UTC
Description of problem:

The command `publican print_unused` prints any and all xml files which are not linked into what publican would build, read they are orphaned. It would be useful if this functionality either extend to, or was available through an additional verb, for unreferenced image files.

Comment 1 Jeff Fearn 🐞 2011-10-10 13:44:48 UTC
Added print_unused_images action.

Added to branches/publican-2x and trunk.

Committed revision 1910.

Comment 2 Martin Prpič 2012-04-24 12:12:47 UTC
Verified with:

]$ rpm -q publican
publican-3.0-0.fc16.t166.noarch
]$ cat /etc/redhat-release 
Fedora release 16 (Verne)

Result:

Unused images (either unreferenced or commented out) are listed when "publican print_unused_images" is run.

Comment 3 Andrew Ross 2012-07-18 06:12:51 UTC
Reading bug 754340 and thought I'd check if print_unused_images works with <graphic> tags. It doesn't.


Setup:

1. Have image.svg in images.
$ ls en-US/images/
icon.svg  image.svg

2. Refn the image using a <graphic> tag.
$ grep "image.svg" en-US/Chapter.xml 
		<graphic fileref="image.svg" />

3. run print_unused_images
$ publican print_unused_images

List of unused Image files in en-US
    images/image.svg

List of missing Image files in en-US
    Common_Content/images/title_logo.svg


Note: tab completion also does not work with print_unused_images.

Comment 4 Jeff Fearn 🐞 2012-07-18 07:06:11 UTC
A: $ publican print_known  | grep -c graphic
0

Graphic is not a supported tag, it's ridiculous to fail it for this reason.

B: Tab completion works but because there are two very similar actions you have to get a long way along for it to know which one to pick.

C: Please stop wasting my time by causing churn on validated bugs.

Comment 5 Andrew Ross 2012-07-19 01:55:27 UTC
(In reply to comment #4)
> A: $ publican print_known  | grep -c graphic
> 0
> 
> Graphic is not a supported tag, it's ridiculous to fail it for this reason.
> 
> B: Tab completion works but because there are two very similar actions you
> have to get a long way along for it to know which one to pick.
> 
> C: Please stop wasting my time by causing churn on validated bugs.

Moving to verified.