diff options
author | Giorgos Keramidas <keramida@FreeBSD.org> | 2008-06-15 17:12:47 +0000 |
---|---|---|
committer | Giorgos Keramidas <keramida@FreeBSD.org> | 2008-06-15 17:12:47 +0000 |
commit | 22b14be34fde75b034c93965f2a9db92367e6902 (patch) | |
tree | e4c1bf0472c760bf1433af95eabb05c7d91b7384 /el_GR.ISO8859-7/share/tools | |
parent | 7477abce2e63432cdd00682fd6b3d70e9d2a75e9 (diff) | |
download | doc-22b14be34fde75b034c93965f2a9db92367e6902.tar.gz doc-22b14be34fde75b034c93965f2a9db92367e6902.zip |
checkupdate: Losen a bit the %SOURCE% path validation check.
It's to return a pathname that doesn't exist, so if it contains a
'/' character it's probably a valid path with a small typo. Let
the rest of the script handle its non-existence, which it already
does fine.
Notes
Notes:
svn path=/head/; revision=32284
Diffstat (limited to 'el_GR.ISO8859-7/share/tools')
-rw-r--r-- | el_GR.ISO8859-7/share/tools/checkupdate/checkupdate.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/el_GR.ISO8859-7/share/tools/checkupdate/checkupdate.py b/el_GR.ISO8859-7/share/tools/checkupdate/checkupdate.py index a650dd0344..8ea764802f 100644 --- a/el_GR.ISO8859-7/share/tools/checkupdate/checkupdate.py +++ b/el_GR.ISO8859-7/share/tools/checkupdate/checkupdate.py @@ -173,10 +173,10 @@ def freebsdrevision(fname): rev = nrev except IOError, inst: if inst.errno == errno.ENOENT: - warning("%s: cannot open file for reading" % fname) + debug(3, "%s: cannot open file for reading" % fname) return None except Exception, inst: - warning("%s: cannot extract revision number: %s" % (fname, str(inst))) + debug(3, "%s: cannot extract revision number: %s" % (fname, str(inst))) return None if not rev: debug(3, "FreeBSD revision not found in file `%s'" % fname) @@ -217,8 +217,10 @@ def fileinfo(fname): if m: nsrc = m.group(2) # Validate the `%SOURCE%' path, to avoid false matches with - # `%SOURCE%' tags in comments or documentation. - if nsrc and os.path.exists(nsrc): + # `%SOURCE%' tags in comments or documentation. This isn't + # exactly a perfect validation check, but it should catch most + # of the common cases. + if nsrc and ('/' in nsrc or os.path.exists(nsrc)): if src: warning("multiple %%SOURCE%% tags in file %s" % fname) src = nsrc @@ -259,7 +261,7 @@ def reportfile(fname, frev, srcfile, srcexists, srcid, srcrev): text = "%s%s" % (fname, frev and " rev. " + str(frev) or "") revtext = "%-10s -> %-10s" % (srcid or "NO-%SRCID%", srcrev or "NONE") if srcfile and not srcexists: - filetext = "%s (DELETED)" % srcfile + filetext = "%s (MISSING)" % srcfile elif srcfile: filetext = "%s" % srcfile else: |