Skip to content

Commit

Permalink
check size in changed_packages (#129)
Browse files Browse the repository at this point in the history
* check size in changed_packages

* add news

* reference issue number
  • Loading branch information
dholth authored Oct 16, 2023
1 parent c267b1f commit 58cfdba
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
5 changes: 3 additions & 2 deletions conda_index/index/sqlitecache.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@ def listdir_stat():

log.debug("%s save fs state", self.subdir)
with self.db:
# always stage='fs', not custom upstream_stage
# always stage='fs', not custom upstream_stage which would be
# handled in a subclass
self.db.execute(
"DELETE FROM stat WHERE stage='fs' AND path like :path_like",
{"path_like": path_like},
Expand Down Expand Up @@ -483,7 +484,7 @@ def changed_packages(self):
FROM fs LEFT JOIN cached USING (path)
WHERE fs.path LIKE :path_like AND
(fs.mtime != cached.mtime OR cached.path IS NULL)
(fs.mtime != cached.mtime OR fs.size != cached.size OR cached.path IS NULL)
""",
{
"path_like": self.database_path_like,
Expand Down
20 changes: 20 additions & 0 deletions news/129-check-size
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### Enhancements

* <news item>

### Bug fixes

* Check size in addition to mtime when deciding which packages to
index. (#108)

### Deprecations

* <news item>

### Docs

* <news item>

### Other

* <news item>

0 comments on commit 58cfdba

Please sign in to comment.