Hello community,

here is the log from the commit of package fdupes for openSUSE:Factory checked 
in at 2014-12-10 23:43:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fdupes (Old)
 and      /work/SRC/openSUSE:Factory/.fdupes.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fdupes"

Changes:
--------
--- /work/SRC/openSUSE:Factory/fdupes/fdupes.changes    2012-10-27 
13:22:49.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.fdupes.new/fdupes.changes       2014-12-10 
23:43:13.000000000 +0100
@@ -1,0 +2,7 @@
+Tue Apr 29 16:08:34 UTC 2014 - [email protected]
+
+- sort the output of fdupes by filename to make it deterministic
+  for parallel builds
+  * 0011-add-an-option-to-sort-duplicate-files-by-name.patch
+
+-------------------------------------------------------------------

New:
----
  0011-add-an-option-to-sort-duplicate-files-by-name.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ fdupes.spec ++++++
--- /var/tmp/diff_new_pack.pVr8dF/_old  2014-12-10 23:43:14.000000000 +0100
+++ /var/tmp/diff_new_pack.pVr8dF/_new  2014-12-10 23:43:14.000000000 +0100
@@ -49,6 +49,8 @@
 Patch9:         0009-glibc-endianness-check-in-md5.patch
 #PATCH-FIX-OPENSUSE: -p/--permissions mode
 Patch10:        0010-add-permissions-mode.patch
+#PATCH-FIX-OPENSUSE: -o/--order mode
+Patch11:        0011-add-an-option-to-sort-duplicate-files-by-name.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %if 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora_version}
@@ -73,6 +75,7 @@
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
+%patch11 -p1
 
 %build
 echo -e "#!/bin/bash\n`which %__cc` \"\$@\"" >gcc

++++++ 0011-add-an-option-to-sort-duplicate-files-by-name.patch ++++++
>From a0b7fb219b8e5203ae9884871c61b7f064e45797 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <[email protected]>
Date: Tue, 29 Apr 2014 19:12:48 +0200
Subject: [PATCH] add an option to sort duplicate files by name
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stefan BrĂ¼ns <[email protected]>
---
 fdupes.1 |  4 ++++
 fdupes.c | 30 ++++++++++++++++++++++++++++--
 2 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/fdupes.1 b/fdupes.1
index e0516f1..b5fb0f6 100644
--- a/fdupes.1
+++ b/fdupes.1
@@ -66,6 +66,10 @@ set of duplicates and delete the others without prompting 
the user
 .B -p --permissions
 don't consider files with different owner/group or permission bits as 
duplicates
 .TP
+.B -o --order\fR=\fIWORD\fR
+order files according to WORD:
+time - sort by mtime, name - sort by filename
+.TP
 .B -v --version
 display fdupes version
 .TP
diff --git a/fdupes.c b/fdupes.c
index b6aeaa7..08f9e2c 100644
--- a/fdupes.c
+++ b/fdupes.c
@@ -55,6 +55,11 @@
 #define F_EXCLUDEHIDDEN     0x1000
 #define F_PERMISSIONS       0x2000
 
+typedef enum {
+  ORDER_TIME = 0,
+  ORDER_NAME
+} ordertype_t;
+
 char *program_name;
 
 unsigned long flags = 0;
@@ -918,6 +923,11 @@ int sort_pairs_by_mtime(file_t *f1, file_t *f2)
   return 0;
 }
 
+int sort_pairs_by_filename(file_t *f1, file_t *f2)
+{
+  return strcmp(f1->d_name, f2->d_name);
+}
+
 void registerpair(file_t **matchlist, file_t *newmatch, 
                  int (*comparef)(file_t *f1, file_t *f2))
 {
@@ -995,6 +1005,9 @@ void help_text()
   printf("                  \teach set of duplicates and delete the rest 
without\n");
   printf("                  \twithout prompting the user\n");
   printf(" -p --permissions \tdon't consider files with different owner/group 
or permission bits as duplicates\n");
+  printf(" -o --order       \tselect sort order for output, linking and 
deleting. One of:\n");
+  printf("    time          \torder by mtime (default)\n");
+  printf("    name          \torder by filename\n");
   printf(" -v --version     \tdisplay fdupes version\n");
   printf(" -h --help        \tdisplay this help message\n\n");
 #ifdef OMIT_GETOPT_LONG
@@ -1015,6 +1028,7 @@ int main(int argc, char **argv) {
   int progress = 0;
   char **oldargv;
   int firstrecurse;
+  ordertype_t ordertype = ORDER_TIME;
   
 #ifndef OMIT_GETOPT_LONG
   static struct option long_options[] = 
@@ -1039,6 +1053,7 @@ int main(int argc, char **argv) {
     { "summarize", 0, 0, 'm'},
     { "summary", 0, 0, 'm' },
     { "permissions", 0, 0, 'p' },
+    { "order", 1, 0, 'o' },
     { 0, 0, 0, 0 }
   };
 #define GETOPT getopt_long
@@ -1050,7 +1065,7 @@ int main(int argc, char **argv) {
 
   oldargv = cloneargs(argc, argv);
 
-  while ((opt = GETOPT(argc, argv, "frRq1Ss::HlnAdvhNmp"
+  while ((opt = GETOPT(argc, argv, "frRq1SsHlndvhNmpo:"
 #ifndef OMIT_GETOPT_LONG
           , long_options, NULL
 #endif
@@ -1104,6 +1119,16 @@ int main(int argc, char **argv) {
     case 'p':
       SETFLAG(flags, F_PERMISSIONS);
       break;
+    case 'o':
+      if (!strcasecmp("name", optarg)) {
+        ordertype = ORDER_NAME;
+      } else if (!strcasecmp("time", optarg)) {
+        ordertype = ORDER_TIME;
+      } else {
+        errormsg("invalid value for --order: '%s'\n", optarg);
+        exit(1);
+      }
+      break;
 
     default:
       fprintf(stderr, "Try `fdupes --help' for more information.\n");
@@ -1179,7 +1204,8 @@ int main(int argc, char **argv) {
       }
 
       if (confirmmatch(file1, file2)) {
-       registerpair(match, curfile, sort_pairs_by_mtime);
+        registerpair(match, curfile,
+            (ordertype == ORDER_TIME) ? sort_pairs_by_mtime : 
sort_pairs_by_filename );
        
        //match->hasdupes = 1;
         //curfile->duplicates = match->duplicates;
-- 
1.8.4.5

++++++ macros.fdupes ++++++
--- /var/tmp/diff_new_pack.pVr8dF/_old  2014-12-10 23:43:14.000000000 +0100
+++ /var/tmp/diff_new_pack.pVr8dF/_new  2014-12-10 23:43:14.000000000 +0100
@@ -3,7 +3,7 @@
  _target=""; \
  _symlinks=0; \
  %{-s:_symlinks=1;} \
- fdupes -q -p -n -r %1 | \
+ fdupes -q -p -n -o name -r %1 | \
   while read _file; do \
     if test -z "$_target" ; then \
       _target="$_file"; \

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to