summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-02-03 21:35:15 +0000
committerMike Frysinger <vapier@gentoo.org>2007-02-03 21:35:15 +0000
commitd72d0058568c55093cd18aab549a9fafafdf7a40 (patch)
tree5a3d3f40a5ea36472b44705fae2a7ba1455b4347 /net-misc/rsync/files
parentRemove old versions depending on wxpython-2.4 (diff)
downloadgentoo-2-d72d0058568c55093cd18aab549a9fafafdf7a40.tar.gz
gentoo-2-d72d0058568c55093cd18aab549a9fafafdf7a40.tar.bz2
gentoo-2-d72d0058568c55093cd18aab549a9fafafdf7a40.zip
Add fix from upstream for file stats #165134 by Lloeki.
(Portage version: 2.1.2-r6)
Diffstat (limited to 'net-misc/rsync/files')
-rw-r--r--net-misc/rsync/files/digest-rsync-2.6.9-r23
-rw-r--r--net-misc/rsync/files/rsync-2.6.9-stats-fix.patch84
2 files changed, 87 insertions, 0 deletions
diff --git a/net-misc/rsync/files/digest-rsync-2.6.9-r2 b/net-misc/rsync/files/digest-rsync-2.6.9-r2
new file mode 100644
index 000000000000..fca949e58851
--- /dev/null
+++ b/net-misc/rsync/files/digest-rsync-2.6.9-r2
@@ -0,0 +1,3 @@
+MD5 996d8d8831dbca17910094e56dcb5942 rsync-2.6.9.tar.gz 811841
+RMD160 36d270d9f01e9a8e808f426196796001bdd3d5d2 rsync-2.6.9.tar.gz 811841
+SHA256 ca437301becd890e73300bc69a39189ff1564baa761948ff149b3dd7bde633f9 rsync-2.6.9.tar.gz 811841
diff --git a/net-misc/rsync/files/rsync-2.6.9-stats-fix.patch b/net-misc/rsync/files/rsync-2.6.9-stats-fix.patch
new file mode 100644
index 000000000000..dd75b6ee7dae
--- /dev/null
+++ b/net-misc/rsync/files/rsync-2.6.9-stats-fix.patch
@@ -0,0 +1,84 @@
+http://bugs.gentoo.org/165121
+
+--- old/flist.c
++++ new/flist.c
+@@ -476,6 +476,9 @@ static void send_file_entry(struct file_
+ }
+
+ strlcpy(lastname, fname, MAXPATHLEN);
++
++ if (S_ISREG(mode) || S_ISLNK(mode))
++ stats.total_size += file->length;
+ }
+
+ static struct file_struct *receive_file_entry(struct file_list *flist,
+@@ -699,6 +702,9 @@ static struct file_struct *receive_file_
+ read_buf(f, sum, checksum_len);
+ }
+
++ if (S_ISREG(mode) || S_ISLNK(mode))
++ stats.total_size += file_length;
++
+ return file;
+ }
+
+@@ -938,9 +944,6 @@ struct file_struct *make_file(char *fnam
+ file->mode = save_mode;
+ }
+
+- if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode))
+- stats.total_size += st.st_size;
+-
+ return file;
+ }
+
+@@ -1357,9 +1360,6 @@ struct file_list *recv_file_list(int f)
+ flags |= read_byte(f) << 8;
+ file = receive_file_entry(flist, flags, f);
+
+- if (S_ISREG(file->mode) || S_ISLNK(file->mode))
+- stats.total_size += file->length;
+-
+ flist->files[flist->count++] = file;
+
+ maybe_emit_filelist_progress(flist->count);
+--- old/io.c
++++ new/io.c
+@@ -245,10 +245,15 @@ static void read_msg_fd(void)
+
+ switch (tag) {
+ case MSG_DONE:
+- if (len != 0 || !am_generator) {
++ if ((len != 0 && len != 8) || !am_generator) {
+ rprintf(FERROR, "invalid message %d:%d\n", tag, len);
+ exit_cleanup(RERR_STREAMIO);
+ }
++ if (len) {
++ read_loop(fd, buf, 8);
++ stats.total_read = IVAL(buf, 0)
++ | (((int64)IVAL(buf, 4)) << 32);
++ }
+ flist_ndx_push(&redo_list, -1);
+ break;
+ case MSG_REDO:
+--- old/main.c
++++ new/main.c
+@@ -710,6 +710,7 @@ static int do_recv(int f_in,int f_out,st
+ }
+
+ if (pid == 0) {
++ char numbuf[8];
+ close(error_pipe[0]);
+ if (f_in != f_out)
+ close(f_out);
+@@ -724,7 +725,9 @@ static int do_recv(int f_in,int f_out,st
+ io_flush(FULL_FLUSH);
+ handle_stats(f_in);
+
+- send_msg(MSG_DONE, "", 0);
++ SIVAL(numbuf, 0, (stats.total_read & 0xFFFFFFFF));
++ SIVAL(numbuf, 4, ((stats.total_read >> 32) & 0xFFFFFFFF));
++ send_msg(MSG_DONE, numbuf, 8);
+ io_flush(FULL_FLUSH);
+
+ /* Handle any keep-alive packets from the post-processing work