Fw: Re: [Apt-rpm] I: [PATCH] 0.5.4cnc9: rsync method support

Sviatoslav Sviridov svd at lintec.minsk.by
Sat Feb 1 00:10:43 EST 2003


Hello,

It would be goog if attached patch will be included in upstream. This
patch adds option --apt-support for rsync and with this option rsync
will print some additiona information about file being transfered. No
program logic changed. Having this option in rsync we can have apt with
rsync method support.

Begin forwarded message:

Date: Fri, 31 Jan 2003 11:34:14 -0200
From: Gustavo Niemeyer <niemeyer at conectiva.com>
To: Sviatoslav Sviridov <svd at lintec.minsk.by>
Cc: apt-rpm at distro.conectiva.com.br
Subject: Re: [Apt-rpm] I: [PATCH] 0.5.4cnc9: rsync method support


> There was 2 patches for rsync: one fixes bug wich causes to recursion
> inside rsync, this applied to upstream. Other required only for apt's
> rsync method, it was not sent to rsync mailing list. May be if apt
> will have rsync method this patch will be applied to upstream :) It
> only add some output to allow apt show download progress.

Can you please contact rsync authors and check if this is doable? I'd
be glad to include support for rsync if no patches in rsync were
necessary.

-- 
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]


-- 
Sviatoslav Sviridoff
// Lintec Project/Minsk // PIN AG/Berlin //
-- 
Kissing a fish is like smoking a bicycle.
-------------- next part --------------
--- rsync-2.5.6/options.c.orig	2003-01-28 06:11:57 +0300
+++ rsync-2.5.6/options.c	2003-01-28 17:38:39 +0300
@@ -127,6 +127,8 @@ static int modify_window_set;
  * address, or a hostname. **/
 char *bind_address;
 
+/** Print information needed for APT rsync method */
+int apt_support = 0;
 
 static void print_rsync_version(enum logcode f)
 {
@@ -370,6 +372,7 @@ static struct poptOption long_options[] 
   {0,		      '4', POPT_ARG_VAL,    &default_af_hint,   AF_INET , 0, 0 },
   {0,		      '6', POPT_ARG_VAL,    &default_af_hint,   AF_INET6 , 0, 0 },
 #endif
+  {"apt-support",      0,  POPT_ARG_NONE,   &apt_support, 0, 0, 0 },
   {0,0,0,0, 0, 0, 0}
 };
 
--- rsync-2.5.6/receiver.c.orig	2003-01-21 02:32:17 +0300
+++ rsync-2.5.6/receiver.c	2003-01-28 17:41:54 +0300
@@ -319,6 +319,7 @@ int recv_files(int f_in,struct file_list
 	extern int preserve_perms;
 	extern int delete_after;
 	extern int orig_umask;
+	extern int apt_support;
 	struct stats initial_stats;
 
 	if (verbose > 2) {
@@ -444,6 +445,12 @@ int recv_files(int f_in,struct file_list
       
 		cleanup_set(fnametmp, fname, file, buf, fd1, fd2);
 
+		if (apt_support) {
+			rprintf(FINFO,"Tmp-Filename: %s\n",fnametmp);
+			rprintf(FINFO,"Size: %u\n",file->length);
+			rprintf(FINFO,"Start: %s\n",fname);
+		}
+
 		if (!am_server) {
 			log_transfer(file, fname);
 		}
@@ -475,6 +482,8 @@ int recv_files(int f_in,struct file_list
 					rprintf(FINFO,"redoing %s(%d)\n",fname,i);
 				write_int(f_gen,i);
 			}
+		} else 	if (apt_support) {
+			rprintf(FINFO,"Done: %s\n",fname);
 		}
 	}
 


More information about the rsync mailing list