Skip to content

Commit 37e7666

Browse files
committed
bla
1 parent e4cb211 commit 37e7666

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

validate

+19-3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ def sha256sum(filename):
5050
for block in iter(lambda: f.read(65536), b""):
5151
hash.update(block)
5252
return hash.hexdigest()
53+
54+
# TODO:
55+
# * check that GAP is available
56+
# * run `gap -h` once to see it starts
57+
# * also, determine from that if --nointeract resp. --quitonbreak resp. --norepl are supported
58+
# * check/fix how --quitonbreak interacts with -T / --nobreakloop
59+
gap_supports_nointeract = False
60+
gap_supports_quitonbreak = False
61+
5362
#
5463
# def mkdir_p(path):
5564
# try:
@@ -66,6 +75,7 @@ def report_progress(count, block_size, total_size):
6675

6776
def read_package_info(pkginfo):
6877
# TODO: pass --quitonbreak if supported
78+
# TODO: pass --nointeract ? etc.
6979
cmd = ['gap', '-A', '-q', '-b']
7080
process = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
7181
output,err = process.communicate('''
@@ -97,7 +107,9 @@ if __name__ == '__main__':
97107

98108
# TODO: allow URL of a PackageInfo.g as optional command line argument
99109
# (allow omitting the final '/PackageInfo.g' part); if given, just
100-
# download from there, don't look for a local file
110+
# download from there, don't look for a local file;
111+
# OR the path to a PackageInfo.g file
112+
101113
if not os.path.isfile("PackageInfo.g"):
102114
error('no PackageInfo.g found')
103115

@@ -140,8 +152,12 @@ if __name__ == '__main__':
140152
# TODO: extract the archive, call ValidatePackageInfo() on it
141153
notice("Validating "+archive_path)
142154

143-
# TODO: add more checks
144-
155+
# TODO: add more checks:
156+
# - check PackageDoc entries
157+
# - check PackageWWWHome, README_URL, IssueTrackerURL, ArchiveURL
158+
# - download the various archives, extract them, check content
159+
# - check for bad absolute paths in HTML files
160+
145161
# tempdir_path = tempfile.mkdtemp()
146162
# try:
147163
#

0 commit comments

Comments
 (0)