should __package update index by default? #68

Closed
opened 2021-11-20 13:23:26 +00:00 by ungleich-gitea · 6 comments

too often I got errors about package not found because index is old or not existent. to avoid that, i added __package_update_index (with reasonable maxage) which is required for __package's. but that's not perfect for obvious reasons.

__package is non-parallel, so first instance of __package also updates index. but that type is just a wrapper, which has no knowledge of state of package and we don't want to update index if no package install is going to happen.

this logic should be implemented separately for every package type. for example, __package_apt will call __package_update_index --type apt --maxage ? in type manifest, if installation will happen. or maybe we should refactor index update logic into own types eg __package_apt_update_index?

also, what should be reasonable maxage?

PS, __apt_update_index should be depreacted 😄

PS2, happy holidays 🎅

too often I got errors about package not found because index is old or not existent. to avoid that, i added `__package_update_index` (with reasonable maxage) which is required for `__package`'s. but that's not perfect for obvious reasons. `__package` is non-parallel, so first instance of `__package` also updates index. but that type is just a wrapper, which has no knowledge of state of package and we don't want to update index if no package install is going to happen. this logic should be implemented separately for every package type. for example, `__package_apt` will call `__package_update_index --type apt --maxage ?` in type manifest, if installation will happen. or maybe we should refactor index update logic into own types eg `__package_apt_update_index`? also, what should be reasonable maxage? PS, `__apt_update_index` should be depreacted :smile: PS2, happy holidays :santa:
Author
Owner

closed

closed
Author
Owner

this issue is resolved for me.

this issue is resolved for me.
Author
Owner

mentioned in merge request !842

mentioned in merge request !842
Author
Owner

changed the description

changed the description
Author
Owner

changed the description

changed the description
Author
Owner

changed title from should __package update {-package -}index by default? to should __package update index by default?

changed title from **should __package update {-package -}index by default?** to **should __package update index by default?**
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#68
No description provided.