Run apt-get update before installing packages #128
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#128
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?
Created by: matthijskooijman
AFAICS, currently apt-get update is not ran before installing packages, which might lead to outdated packages being installed, or 404 errors on downloads.
There is
__apt_update_index, but that only updates if anything in/etc/aptchanged, ignoring the fact that the package archive itself also changes. There is__package_update_index, which supports updating on every run, or whenever the indexes are older than some specified time, but that will likely cause downloading the indices when they're not going to be used.To properly solve this, the
__package_apttype should (implicitly?) depend on__package_update_index, which should have some kind of--only-when-neededflag (implied when the user does not specify__package_update_indexin the manifest explicitly?). This does require the__package_update_indextype to be able to look into the future to see if any__package_apttypes are going to be executed (and it should probably not hardcode that name, so the relation should probably be reversed).Ideally, this update type would also be used by
__apt_source, which now just callsapt-get update, which could then lead to running it twice when not really needed.Again, not sure how this should work, but would be nice if it would work automatically :-)
closed