Hello,

FWIW I rebased the patchs. Please find them attached. It looks like 2 pretty
minor bugfixes that should be safe to apply.

Cheers,
-- 
Raphaël Hertzog

Le best-seller français mis à jour pour Debian Etch :
http://www.ouaza.com/livre/admin-debian/
>From fb03c754185dfb50c34b6863ed5060e3d0a78490 Mon Sep 17 00:00:00 2001
From: Egmont Koblinger <[EMAIL PROTECTED]>
Date: Thu, 1 Nov 2007 16:17:12 +0000
Subject: [PATCH] Fix a bug in configuration file handling where dpkg didn't respect the --root argument

* src/processarc.c: lstat correct conffile path even with --root.
  Previously we would incorrectly ignore --root here. Closes: #281057
---
 src/processarc.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/processarc.c b/src/processarc.c
index 1550414..cbad9ba 100644
--- a/src/processarc.c
+++ b/src/processarc.c
@@ -60,7 +60,7 @@ void process_archive(const char *filename) {
   static char *cidirbuf = NULL, *reasmbuf = NULL;
   static struct fileinlist *newconffiles, *newfileslist;
   static enum pkgstatus oldversionstatus;
-  static struct varbuf infofnvb, fnvb, depprobwhy;
+  static struct varbuf infofnvb, fnvb, cfnvb, depprobwhy;
   static struct tarcontext tc;
   
   int c1, r, admindirlen, i, infodirlen, infodirbaseused, status;
@@ -670,7 +670,12 @@ void process_archive(const char *filename) {
       for (cfile= newfileslist; cfile; cfile= cfile->next) {
 	if (!cfile->namenode->filestat) {
 	  cfile->namenode->filestat= nfmalloc(sizeof(struct stat));
-	  if (lstat(cfile->namenode->name, cfile->namenode->filestat)) {
+	  varbufreset(&cfnvb);
+	  varbufaddstr(&cfnvb,instdir);
+	  varbufaddc(&cfnvb,'/');
+	  varbufaddstr(&cfnvb,cfile->namenode->name);
+	  varbufaddc(&cfnvb,0);
+	  if (lstat(cfnvb.buf, cfile->namenode->filestat)) {
 	    if (!(errno == ENOENT || errno == ELOOP || errno == ENOTDIR))
 	      ohshite(_("unable to stat other new file `%.250s'"),
 		      cfile->namenode->name);
-- 
1.5.3.8

>From 88605d1adc515e052c7f7b29ff45b79925bb3343 Mon Sep 17 00:00:00 2001
From: Ian Jackson <[EMAIL PROTECTED]>
Date: Mon, 19 Nov 2007 21:19:36 +0100
Subject: [PATCH] * src/processarc.c (process_archive): Fix incorrect sizeof in a memset call.

---
 src/processarc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/processarc.c b/src/processarc.c
index cbad9ba..ac48208 100644
--- a/src/processarc.c
+++ b/src/processarc.c
@@ -680,7 +680,7 @@ void process_archive(const char *filename) {
 	      ohshite(_("unable to stat other new file `%.250s'"),
 		      cfile->namenode->name);
 	    memset(cfile->namenode->filestat, 0,
-		   sizeof(cfile->namenode->filestat));
+		   sizeof(*cfile->namenode->filestat));
 	    continue;
 	  }
 	}
-- 
1.5.3.8

Reply via email to