summaryrefslogtreecommitdiffstats
path: root/bin/repoman
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-18 07:37:28 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-18 07:37:28 -0700
commitba283624d5e607deffb9b5849ea4890ef773e739 (patch)
tree44cd7fb755246103df123ee51c0bcf354c779c00 /bin/repoman
parent14c7b1773dea0961a6c718dc72ab3cf20c9554a9 (diff)
downloadportage-ba283624d5e607deffb9b5849ea4890ef773e739.tar.gz
portage-ba283624d5e607deffb9b5849ea4890ef773e739.tar.bz2
portage-ba283624d5e607deffb9b5849ea4890ef773e739.zip
Bug #324075 - If the vcs doesn't preserve mtimes then disable the
copyright date check unless the ebuild has just been added or modified.
Diffstat (limited to 'bin/repoman')
-rwxr-xr-xbin/repoman10
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/repoman b/bin/repoman
index 4ba227397..df4232516 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -517,7 +517,7 @@ else:
check_changelog = vcs in ('cvs', 'svn')
# Disable copyright/mtime check if vcs does not preserve mtime (bug #324075).
-check_copyright_mtime = vcs not in ('git',)
+vcs_preserves_mtime = vcs not in ('git',)
vcs_local_opts = repoman_settings.get("REPOMAN_VCS_LOCAL_OPTS", "").split()
vcs_global_opts = repoman_settings.get("REPOMAN_VCS_GLOBAL_OPTS")
@@ -939,6 +939,7 @@ else:
print(green("\nRepoMan scours the neighborhood..."))
new_ebuilds = set()
+modified_ebuilds = set()
modified_changelogs = set()
mychanged = []
mynew = []
@@ -970,6 +971,7 @@ elif vcs == "hg":
if vcs:
new_ebuilds.update(x for x in mynew if x.endswith(".ebuild"))
+ modified_ebuilds.update(x for x in mychanged if x.endswith(".ebuild"))
modified_changelogs.update(x for x in chain(mychanged, mynew) \
if os.path.basename(x) == "ChangeLog")
@@ -1791,8 +1793,10 @@ for x in scanlist:
# Syntax Checks
relative_path = os.path.join(x, y + ".ebuild")
full_path = os.path.join(repodir, relative_path)
- if not check_copyright_mtime:
- pkg.mtime = None
+ if not vcs_preserves_mtime:
+ if ebuild_path not in new_ebuilds and \
+ ebuild_path not in modified_ebuilds:
+ pkg.mtime = None
try:
# All ebuilds should have utf_8 encoding.
f = codecs.open(_unicode_encode(full_path,