Skip to content

Hide unchanged option does not hide moved unchanged files #53

Open
@locobastos

Description

@locobastos

Hello,

Your program is very useful is almost all cases but in some rare cases, where the package are built unconventionally, the diff report is not usable.

Let me explain:

In my company, we are building our software/web services "unconventionally", and we are installing each version in a separate folder:

/opt/my_company/my_product/1.0.0/all_my_files...
/opt/my_company/my_product/1.1.0/all_my_files...
/opt/my_company/my_product/1.2.0/all_my_files...
/opt/my_company/my_product/1.3.0/all_my_files...

Between version 1.2.0 and version 1.3.0, it may have few changes.

When I'm running pkgdiff on both RPM (we are using RPM-based Linux servers), ALL files are reported as moved (yes, it's true) with a Delta = 0%

My RFE is to hide these results when we are using the -hide-unchanged option to keep only files with real delta, even if they are moved.

To reach this point, I've changed this part of code:

https://github.com/lvc/pkgdiff/blob/master/pkgdiff.pl#L2171

2169    if($HideUnchanged)
2170    {
2171        if($Info{"Status"} eq "unchanged")
2172        {  # do not show unchanged files
2173            next;
2174        }
2175    }

to add:

2169    if($HideUnchanged)
2170    {
2171        if($Info{"Status"} eq "unchanged" or show_number($Info{"Rate"}*100) eq 0)
2172        {  # do not show unchanged files
2173            next;
2174        }
2175    }

This let me know which files are modified between two packages ignoring moved file without any modification.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions