releasing/blocks/cclient/patches/linux/dpkg-remove-chown.patch
changeset 632 934f9131337b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/releasing/blocks/cclient/patches/linux/dpkg-remove-chown.patch	Thu Sep 02 15:02:14 2010 +0800
@@ -0,0 +1,62 @@
+diff -Naur dpkg-1.14.23.orig/src/archives.c dpkg-1.14.23/src/archives.c
+--- dpkg-1.14.23.orig/src/archives.c	2008-11-18 12:57:34.000000000 +0200
++++ dpkg-1.14.23/src/archives.c	2008-12-16 20:18:28.000000000 +0200
+@@ -267,10 +267,11 @@
+ }
+ 
+ static void newtarobject_allmodes(const char *path, struct TarInfo *ti, struct filestatoverride* statoverride) {
++  /* Blocks does not need this
+   if (chown(path,
+ 	    statoverride ? statoverride->uid : ti->UserID,
+ 	    statoverride ? statoverride->gid : ti->GroupID))
+-    ohshite(_("error setting ownership of `%.255s'"),ti->Name);
++    ohshite(_("error setting ownership of `%.255s'"),ti->Name);*/
+   if (chmod(path,(statoverride ? statoverride->mode : ti->Mode) & ~S_IFMT))
+     ohshite(_("error setting permissions of `%.255s'"),ti->Name);
+   newtarobject_utime(path,ti);
+@@ -664,10 +665,11 @@
+ 			  nifd->namenode->statoverride->uid,
+ 			  nifd->namenode->statoverride->gid,
+ 			  nifd->namenode->statoverride->mode);
++    /* Blocks does not need this
+     if (fchown(fd,
+ 	    nifd->namenode->statoverride ? nifd->namenode->statoverride->uid : ti->UserID,
+ 	    nifd->namenode->statoverride ? nifd->namenode->statoverride->gid : ti->GroupID))
+-      ohshite(_("error setting ownership of `%.255s'"),ti->Name);
++      ohshite(_("error setting ownership of `%.255s'"),ti->Name);*/
+     am=(nifd->namenode->statoverride ? nifd->namenode->statoverride->mode : ti->Mode) & ~S_IFMT;
+     if (fchmod(fd,am))
+       ohshite(_("error setting permissions of `%.255s'"),ti->Name);
+@@ -708,6 +710,7 @@
+     if (symlink(ti->LinkName,fnamenewvb.buf))
+       ohshite(_("error creating symbolic link `%.255s'"),ti->Name);
+     debug(dbg_eachfiledetail,"tarobject SymbolicLink creating");
++    /* Blocks does not need this
+ #ifdef HAVE_LCHOWN
+     if (lchown(fnamenewvb.buf,
+ 	    nifd->namenode->statoverride ? nifd->namenode->statoverride->uid : ti->UserID,
+@@ -718,7 +721,7 @@
+ 	    nifd->namenode->statoverride ? nifd->namenode->statoverride->uid : ti->UserID,
+ 	    nifd->namenode->statoverride ? nifd->namenode->statoverride->gid : ti->GroupID))
+       ohshite(_("error setting ownership of symlink `%.255s'"),ti->Name);
+-#endif
++#endif*/
+     break;
+   case Directory:
+     /* We've already checked for an existing directory. */
+@@ -772,13 +775,14 @@
+       symlinkfn.used= r; varbufaddc(&symlinkfn,0);
+       if (symlink(symlinkfn.buf,fnametmpvb.buf))
+         ohshite(_("unable to make backup symlink for `%.255s'"),ti->Name);
++    /* Blocks does not need this
+ #ifdef HAVE_LCHOWN
+       if (lchown(fnametmpvb.buf,stab.st_uid,stab.st_gid))
+         ohshite(_("unable to chown backup symlink for `%.255s'"),ti->Name);
+ #else
+       if (chown(fnametmpvb.buf,stab.st_uid,stab.st_gid))
+         ohshite(_("unable to chown backup symlink for `%.255s'"),ti->Name);
+-#endif
++#endif*/
+     } else {
+       debug(dbg_eachfiledetail,"tarobject nondirectory, `link' backup");
+       if (link(fnamevb.buf,fnametmpvb.buf))