#18993 closed defect (fixed)
sage-list-packages should ignore files in build/pkgs/
Reported by: | jkeitel | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | sage-6.9 |
Component: | spkg-check | Keywords: | |
Cc: | vbraun | Merged in: | |
Authors: | Jan Keitel | Reviewers: | Volker Braun |
Report Upstream: | N/A | Work issues: | |
Branch: | 68e5d14 (Commits, GitHub, GitLab) | Commit: | |
Dependencies: | Stopgaps: |
Description
At the moment, sage-list-packages
does not ignore files in build/pkgs
, which can lead to errors if, say, your browser has automatically created a file after viewing this folder:
jkeitel@pcl337b:~/sage/sage_optional> ./sage -optional Traceback (most recent call last): File "/home/pcl337b/jkeitel/sage/sage_optional/src/bin/sage-list-packages", line 57, in <module> with open(os.path.join(SAGE_PKGS, p, "package-version.txt")) as f: IOError: [Errno 20] Not a directory: '/home/pcl337b/jkeitel/sage/sage_optional/build/pkgs/.directory/package-version.txt'
I am attaching a simple patch that ignores files and only checks folders.
Change History (8)
comment:1 Changed 7 years ago by
- Cc vbraun added
comment:2 Changed 7 years ago by
- Status changed from new to needs_review
comment:3 Changed 7 years ago by
- Reviewers set to Volker Braun
- Status changed from needs_review to positive_review
comment:4 in reply to: ↑ description Changed 7 years ago by
comment:5 Changed 7 years ago by
- Branch changed from u/jkeitel/sage-list-packages to 68e5d145936af69ea63cdd9a01d42c38bb0306d0
- Resolution set to fixed
- Status changed from positive_review to closed
comment:6 Changed 7 years ago by
- Commit 68e5d145936af69ea63cdd9a01d42c38bb0306d0 deleted
A file there isn't really indicative of an error, the packages are the subdirectories. We probably shouldn't put any files in build/pkgs but enforcing that because otherwise scripts break in an obscure way isn't good either.
comment:7 Changed 7 years ago by
Between the following 2 options:
(a) ignore all non-directories.
(b) ignore all hidden files and directories.
I'm sure that (b) is the better option, but at this point I don't care enough to create a follow-up ticket.
comment:8 Changed 7 years ago by
I'm also fine with b) but don't care so much about it that I would patch it ;-)
PS: The perfect is the enemy of the good
Replying to jkeitel:
I think a better solution would be to ignore hidden files/directories. An ordinary file in
build/pkgs
usually does indicate a problem for which an error is appropriate.