Sort files after finding duplicates. 68/85768/1 accepted/tizen_3.0.m2_base accepted/tizen_3.0_base accepted/tizen_4.0_base accepted/tizen_5.0_base accepted/tizen_5.5_base accepted/tizen_5.5_base_mobile_hotfix accepted/tizen_5.5_base_wearable_hotfix accepted/tizen_6.0_base accepted/tizen_6.0_base_tool accepted/tizen_6.0_base_tool_hotfix accepted/tizen_6.5_base accepted/tizen_6.5_base_tool sandbox/backup/fdupes-1.40-20211111 tizen_3.0.m2_base tizen_3.0_base tizen_4.0_base tizen_4.0_tv tizen_5.0_base tizen_5.5_base tizen_5.5_base_mobile_hotfix tizen_5.5_base_wearable_hotfix tizen_5.5_tv tizen_6.0_base tizen_6.0_base_hotfix tizen_6.5_base accepted/tizen/3.0.m2/base/20170104.081830 accepted/tizen/3.0/base/20161028.102927 accepted/tizen/4.0/base/20170811.092623 accepted/tizen/4.0/base/20170828.221013 accepted/tizen/5.0/base/20181101.090205 accepted/tizen/5.5/base/20191030.081620 accepted/tizen/5.5/base/mobile/hotfix/20201023.084213 accepted/tizen/5.5/base/wearable/hotfix/20201023.080616 accepted/tizen/6.0/base/20201029.110531 accepted/tizen/6.0/base/20230713.142830 accepted/tizen/6.0/base/tool/20201029.112006 accepted/tizen/6.0/base/tool/hotfix/20201030.124807 accepted/tizen/6.0/base/tool/hotfix/20201102.090004 accepted/tizen/6.5/base/20230714.002457 accepted/tizen/6.5/base/tool/20211027.115158 accepted/tizen/base/20160923.170305 submit/tizen_3.0.m2_base/20170104.073748 submit/tizen_3.0_base/20161028.062323 submit/tizen_4.0_base/20170811.071500 submit/tizen_4.0_base/20170828.000000 submit/tizen_4.0_base/20170828.000001 submit/tizen_5.0_base/20181101.000001 submit/tizen_5.5_base/20191030.000001 submit/tizen_5.5_base_mobile_hotfix/20201023.171501 submit/tizen_5.5_base_wearable_hotfix/20201023.155601 submit/tizen_6.0_base/20201029.184801 submit/tizen_6.0_base_hotfix/20201030.192501 submit/tizen_6.0_base_hotfix/20201102.162701 submit/tizen_6.5_base/20211026.180901 submit/tizen_6.5_base/20211027.183101 submit/tizen_6.5_base/20211027.200601 submit/tizen_base/20160913.071300 submit/tizen_base/20160921.004452 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m1_release tizen_4.0.m2_release tizen_5.5.m2_release tizen_6.0.m2_release tizen_6.5.m2_release
authorJunghyun Kim <jh0822.kim@samsung.com>
Mon, 29 Aug 2016 04:56:31 +0000 (13:56 +0900)
committerJunghyun Kim <jh0822.kim@samsung.com>
Mon, 29 Aug 2016 04:56:31 +0000 (13:56 +0900)
commit53ce4c8197d9fdfaa2df7661e912290b5d60e9a8
tree0277a399306a216eb6dde51c81f5c7324f2d726a
parent796ff677d7ed1bdd2fb8d3b48572dba6a8e111f6
Sort files after finding duplicates.

- PROBLEM
If a and b are found duplicates, one of them is changed to
a symbolic link using %fdupes in a spec file.
However, it is non-deterministic which file is to be symlinked
because fdupes does not sort files.
In this case, OBS can detect the result is different even if
the source is unchanged.

- SOLUTION
I changed macro.fdupes to sort duplicate files.

*** Bug fixed: several groups of duplicates are handled well now.

- BUG
"fdupes -r ." returns like below:
a
b

c
d
e

This means, there are two sets of duplicates (a,b) and (c,d,e).
The previous commit does not consider this case.
(only considers there are single set of duplicates.)
By just sorting everything, all files are considered as duplicates.

We need to sort each set while preserving blank lines.
Now, it performs well even for this case.

Change-Id: I9de68b11674de79c34220f7c324c810aa006cc19
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
packaging/macros.fdupes