]> git.pld-linux.org Git - packages/rsync.git/blob - ignore-vanished.patch
- rel 6; actually apply the patch
[packages/rsync.git] / ignore-vanished.patch
1 --- rsync-3.0.7/options.c       2011-01-25 22:48:48.321864668 +0200
2 +++ rsync-3.0.7.vanished/options.c      2011-01-25 22:45:00.289582095 +0200
3 @@ -121,6 +121,7 @@
4  int checksum_seed = 0;
5  int inplace = 0;
6  int delay_updates = 0;
7 +int ignore_vanished = 0;
8  long block_size = 0; /* "long" because popt can't set an int32. */
9  char *skip_compress = NULL;
10  item_list dparam_list = EMPTY_ITEM_LIST;
11 @@ -574,6 +575,7 @@
12    {"delete-delay",     0,  POPT_ARG_VAL,    &delete_during, 2, 0, 0 },
13    {"delete-after",     0,  POPT_ARG_NONE,   &delete_after, 0, 0, 0 },
14    {"delete-excluded",  0,  POPT_ARG_NONE,   &delete_excluded, 0, 0, 0 },
15 +  {"ignore-vanished",  0,  POPT_ARG_NONE,   &ignore_vanished, 0, 0, 0 },
16    {"remove-sent-files",0,  POPT_ARG_VAL,    &remove_source_files, 2, 0, 0 }, /* deprecated */
17    {"remove-source-files",0,POPT_ARG_VAL,    &remove_source_files, 1, 0, 0 },
18    {"force",            0,  POPT_ARG_VAL,    &force_delete, 1, 0, 0 },
19 --- rsync-3.0.7/sender.c        2009-12-13 03:23:03.000000000 +0200
20 +++ rsync-3.0.7.vanished/sender.c       2011-01-25 22:48:26.834861230 +0200
21 @@ -42,6 +42,7 @@
22  extern int inplace;
23  extern int batch_fd;
24  extern int write_batch;
25 +extern int ignore_vanished;
26  extern struct stats stats;
27  extern struct file_list *cur_flist, *first_flist, *dir_flist;
28  
29 @@ -282,12 +283,14 @@
30                 fd = do_open(fname, O_RDONLY, 0);
31                 if (fd == -1) {
32                         if (errno == ENOENT) {
33 -                               enum logcode c = am_daemon
34 -                                   && protocol_version < 28 ? FERROR
35 +                               if (!ignore_vanished) {
36 +                                       enum logcode c = am_daemon
37 +                                               && protocol_version < 28 ? FERROR
38                                                              : FWARNING;
39 -                               io_error |= IOERR_VANISHED;
40 -                               rprintf(c, "file has vanished: %s\n",
41 -                                       full_fname(fname));
42 +                                       io_error |= IOERR_VANISHED;
43 +                                       rprintf(c, "file has vanished: %s\n",
44 +                                               full_fname(fname));
45 +                }
46                         } else {
47                                 io_error |= IOERR_GENERAL;
48                                 rsyserr(FERROR_XFER, errno,
49 --- rsync-3.0.7/flist.c~        2011-02-10 18:51:29.000000000 +0200
50 +++ rsync-3.0.7/flist.c 2011-02-10 19:15:56.125220647 +0200
51 @@ -59,6 +59,7 @@
52  extern int implied_dirs;
53  extern int file_extra_cnt;
54  extern int ignore_perishable;
55 +extern int ignore_vanished;
56  extern int non_perishable_cnt;
57  extern int prune_empty_dirs;
58  extern int copy_links;
59 @@ -1127,7 +1127,7 @@
60                                         full_fname(thisname));
61                         } else
62  #endif
63 -                       {
64 +                       if (!ignore_vanished) {
65                                 enum logcode c = am_daemon && protocol_version < 28
66                                                ? FERROR : FWARNING;
67                                 io_error |= IOERR_VANISHED;
This page took 0.143381 seconds and 3 git commands to generate.