__package_update_index does not update on new installations if --maxage given #63
Labels
No labels
bugfix
cleanup
discussion
documentation
doing
done
feature
improvement
packaging
Stale
testing
TODO
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ungleich-public/cdist#63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
By setup new lxc containers, some default manifests are run (which also runs every time a container gets reconfigured). In these manifests,
__package_update_index --maxage $((60 * 60 * 24))and several__packagetypes get called.These fail because the package index is not up to date (up to this, no
__package_update_indexgot really executed). By debugging this, the currage explorer echos0if it does not find the specific file to stat. After creating a brand new lxc container, the specific file do not exist. Therefor, thegencode-remoteexists, because the explorer returned a lower value than the maxage parameter.In the lxc container installation, no package index update was done, so there is no cache file to stat. In such case, the type should rather assume no index update was done and do an update.
I think this can be solved several ways (but don't know the best):
0special and make an index update; theoretical, the type could be executed again as fast as the time difference is still0, which would be a false positive-1, which is a slightly better solution than 2.); thegencode-remotemust then first check if this case happened before comparing both values as integersclosed
mentioned in merge request !858
As @ander stated in chat, nothing more should be done with these special index updating types, because there should be moved to the package installation type. This is already done for the
__package_apttype, but not for pacman or apk.I'll still creating a merge request for it, because it is no big deal (and I've already wrote this), required for
__package_pacmanand maybe some people will still using this type ;-)mentioned in commit matze/cdist@358e04b2af