[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debian binary diff system ?! script.



On Thu, Nov 19, 1998 at 04:35:34PM +0100, Kai Duebbert wrote:
> On Wed, 18 Nov 1998, Joey Hess wrote:
> 
> > Kai Duebbert wrote:
> > I haven't done any tests yet, but it seems to me this method is unnecessary.
> > The reason it doesn't work ok on formal .debs is because they are
> > compressed. Just doing:
> > 
> > ar x file.deb
> > gunzip control.tar.gz
> > gunzip data.tar.gz
> > 
> > And running xdelta on the tar files, should be sufficient. Can you let me
> well, still the old topic. if you run xdelta against the .tar files, you
> get an delta of the .tar files, not of every file that is in there. maybe
> an example:

[ can apply in situ argument ]

Also, doing individual file method seems to make the delta a fair
bit smaller. Remember though about permissions etc. Maybe we ought
to generate a script which touch's, chown's, and chmod's the files.

> > know the set of packages you tested it on that got 40%?
> sed_2.05-22.deb (26828 b) -> sed_3.02-1.deb (64530 b) -> diff (26828 b)
> grep_2.1-8.deb (60070 b) -> grep_2.2-1.deb (61352 b) -> diff (31352 b)

Here are some more results, using that script:-

e2fsprogs:-
old e2fsprogs_1.10-17.deb (151266)
new n-n/e2fsprogs_1.12-2.deb (163962)
diff  (103626)
Reduced 63.2012295531892

kbd:-
old kbd_0.95-16.deb (468406)
new n-n/kbd_0.96a-6.deb (114006)
diff  (68580)
Reduced 60.1547286984896

libc6:-
old libc6_2.0.7t-1.deb (580872)
new n-n/libc6_2.0.7u-2.deb (608906)
diff  (401172)
Reduced 65.8840609223755

makedev:-
old makedev_1.6-32.deb (35020)
new n-n/makedev_2.3.1-3.deb (15730)
diff  (16134)
Reduced 102.568340750159

modutils:-
old modutils_2.1.85-11.deb (116042)
new n-n/modutils_2.1.121-5.deb (122248)
diff  (53740)
Reduced 43.9598193835482

mount:-
old mount_2.7l-5.deb (53444)
new n-n/mount_2.8a-1.1.deb (54930)
diff  (25040)
Reduced 45.5852903695613

ncurses-base:-
old ncurses-base_1.9.9g-8.8.deb (6702)
new n-n/ncurses-base_4.2-2.deb (13754)
diff  (12342)
Reduced 89.733895594009
n-n/ncurses-bin_4.2-2.deb

ncurses-bin:-
old ncurses-bin_1.9.9g-8.8.deb (60982)
new n-n/ncurses-bin_4.2-2.deb (66856)
diff  (59410)
Reduced 88.8626301304296

timezones:-
old timezones_2.0.7t-1.deb (261268)
new n-n/timezones_2.0.7u-2.deb (266124)
diff  (183626)
Reduced 69.0001653364597

These were hamm->slink (ish) changes, using the same script.
The only bad result seems to be makedev, but its not too big
to re-download.

Also, patching the script as attached does significantly reduce
the workload needed, and reduces the diff size for at least
timezones (to 114828).

-- 
Tom Lees <tom@lpsg.demon.co.uk> <tom@debian.org>  http://www.lpsg.demon.co.uk/
PGP Key: finger tom@master.debian.org, http://www.lpsg.demon.co.uk/pgpkeys.asc.
--- make-diff.old	Thu Nov 19 22:46:27 1998
+++ make-diff	Thu Nov 19 22:47:42 1998
@@ -65,13 +65,17 @@
 			else
 				COMPARE=$DIR_OLD/`echo $i | cut -d '/' -f 2-`
 				COMPARE_DIFF=$DIR_DIFF/`echo $i | cut -d '/' -f 2-`
-				echo "found a FILE ($i) comparing to ($COMPARE)" #DEBUG
-				if [ -f $COMPARE ]; then
-					echo "XDELTA $i $COMPARE $COMPARE_DIFF"
-					xdelta delta -9 $i $COMPARE $COMPARE_DIFF.xd
+				if cmp -s $COMPARE $i; then
+					echo $i not changed, skipping diff
 				else
-					echo "comparing file against $COMPARE"
-					cp $i $COMPARE_DIFF
+					echo "found a FILE ($i) comparing to ($COMPARE)" #DEBUG
+					if [ -f $COMPARE ]; then
+						echo "XDELTA $i $COMPARE $COMPARE_DIFF"
+						xdelta delta -9 $i $COMPARE $COMPARE_DIFF.xd
+					else
+						echo "comparing file against $COMPARE"
+						cp $i $COMPARE_DIFF
+					fi
 				fi
 			fi
 		fi

Reply to: