gets "-dirty" under fakeroot

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

 



Hi,

I noticed that compiling git under fakeroot always gives me "-dirty"
in the version string even though the working directory is clean.

Git generates version string with GIT-VERSION-GEN. in the script,
working directory is checked to see whether it's clean or not.  if you
run the script under fakeroot, it always say the working directory is
dirty. that is, git diff-index HEAD reports files have changed.

that is because under fakeroot, we get faked value 0 for uid and gid,
but we already have our own uid/gid in the cache. those two values are
compared in ce_match_stat_basic()::read-cache.c:

	if (ce->ce_uid != htonl(st->st_uid) ||
	    ce->ce_gid != htonl(st->st_gid))
		changed |= OWNER_CHANGED;

I noticed that the code fragment is important because:
    /*
     * dev/ino/uid/gid/size are also just tracked to the low 32 bits
     * Again - this is just a (very strong in practice) heuristic that
     * the inode hasn't changed.


Now what should I do?

1) run git update-index --refresh with fakeroot before doing
   diff-index.

2) add --except-uid-gid to diff-index

3) just don't care about the "-dirty" string.

4) do whatever I do under real root env.


How do you guys do when you create snapshot package like rpm or deb?
or is this just me?

regards,
-- 
          yashi
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]