Your message dated Sun, 4 Jan 2009 04:11:20 +0000
with message-id <[email protected]>
and subject line bug fixed?
has caused the Debian Bug report #425007,
regarding PATCH: avoid file type mismatch
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
425007: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=425007
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: fakeroot
Version: 1.5.10

Hi,

I have the following situation:

I am using an fakeroot environment as backup destitination. Due to an action
which I cannot reproduce I have the state that a directory is included
as regular file in the fakeroot internal database.

This shows like:

-- within fakeroot environment:

# ls -l entry
-rw-r--r-- 6 jeans 501 4096 2006-12-09 13:29 entry
# stat entry
  File: `entry'
  Size: 4096            Blocks: 8          IO Block: 4096   regular file
Device: fd00h/64768d    Inode: 14320090    Links: 6
Access: (0644/-rw-r--r--)  Uid: ( 1000/   jeans)   Gid: (  501/ UNKNOWN)
Access: 2006-12-09 13:27:20.000000000 +0100
Modify: 2006-12-09 13:29:22.000000000 +0100
Change: 2006-12-09 13:29:22.000000000 +0100
# rm entry
rm: cannot remove `entry': Is a directory

-- outside fakeroot:
# stat entry
  File: `entry'
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: fd00h/64768d    Inode: 14320090    Links: 6
Access: (0755/drwxr-xr-x)  Uid: ( 1002/paddy)   Gid: ( 1002/paddy)
Access: 2006-12-09 13:27:20.000000000 +0100
Modify: 2006-12-09 13:29:22.000000000 +0100
Change: 2006-12-09 13:29:22.000000000 +0100

-- fakeroot data:
# grep 14320090 < .fakeroot-table
dev=fd00,ino=14320090,mode=100644,uid=1000,gid=501,nlink=1,rdev=0

This is a bad situation because it confuses rsync, which cannot correct the 
problem.
So I think whenever we have something other than a regular file on the source 
filesystem,
we should preserve it, even if we have something different in the fake tables.

Here is a patch for this:

--- fakeroot-1.5.10ubuntu1.org/communicate.c    2005-11-02 15:53:26.000000000 
+0100
+++ fakeroot-1.5.10ubuntu1/communicate.c        2007-05-18 13:15:15.000000000 
+0200
@@ -322,7 +322,16 @@ void cpystat64fakem(struct stat64 *st,

 void cpyfakefake(struct fakestat *dest,
                  const struct fakestat *source){
-  dest->mode =source->mode;
+  mode_t type;
+  /* If destination is not a regular file keep the
+     file type as-is. -- jens wilke */
+  if (S_ISREG(dest->mode)) {
+    dest->mode =source->mode;
+  } else {
+    type = dest->mode & S_IFMT;
+    dest->mode =source->mode & ~S_IFMT;
+    dest->mode |= type;
+  }
   dest->ino  =source->ino ;
   dest->uid  =source->uid ;
   dest->gid  =source->gid ;

I wil try to catch the problem which originally caused this mismatch.

Best,

Jens

-- 
"Everything superfluous is wrong!"

   // Jens Wilke - headissue GmbH - Germany
 \//  http://www.headissue.com


--- End Message ---
--- Begin Message ---
Please reopen with additional information.


--- End Message ---

Reply via email to