From: Yasushi SHOJI <yashi@atmark-techno.com>
To: git@vger.kernel.org
Subject: gets "-dirty" under fakeroot
Date: Tue, 23 Jan 2007 19:59:17 +0900 [thread overview]
Message-ID: <87ac0auhyy.wl@mail2.atmark-techno.com> (raw)
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
next reply other threads:[~2007-01-23 10:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-23 10:59 Yasushi SHOJI [this message]
2007-01-23 14:22 ` gets "-dirty" under fakeroot Matthias Lederhofer
2007-01-24 0:27 ` Yasushi SHOJI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ac0auhyy.wl@mail2.atmark-techno.com \
--to=yashi@atmark-techno.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).