Bug 22225

Summary: filterpineconf could help with different orders of statements (sort ?)
Product: Sisyphus Reporter: Ivan Zakharyaschev <imz>
Component: pineAssignee: viy <viy>
Status: NEW --- QA Contact: qa-sisyphus
Severity: enhancement    
Priority: P3    
Version: unstable   
Hardware: all   
OS: Linux   
Bug Depends on:    
Bug Blocks: 22226    
Attachments:
Description Flags
diff -du ~/tmp/pine-conf-filtered/installed ~/tmp/pine-conf-filtered/current none

Description Ivan Zakharyaschev 2009-11-09 18:32:36 MSK
Created attachment 4051 [details]
diff -du ~/tmp/pine-conf-filtered/installed ~/tmp/pine-conf-filtered/current

pine-4.64L-alt6

filterpineconf is a convenient tool.

It would be even more convenient if it would help in cases when the order of statements in compared conf-files is different. Probably, it could sort them and place them in some canonical order.

Consider this case:

one installs pine-4.64L-alt6 on a clean system; during the installation, an /etc/pine.conf with comments is genearted; and now one tries to comapre the generated /etc/pine.conf with the original concise configuration that came with the package and that reflects the packager's intentions (/etc/pine.conf.rpmorig):

filterpineconf /etc/pine.conf > ~/tmp/pine-conf-filtered/current

filterpineconf  /etc/pine.conf.rpmorig > ~/tmp/pine-conf-filtered/installed

diff -du ~/tmp/pine-conf-filtered/installed ~/tmp/pine-conf-filtered/current

The result (attached) shows that there a lot of differences detected, although the real differences must be just in the order.

Expected result: empty diff (filterpineconf helps you to compare configuration files with different).orders.