globalcitizen / lxc-gentoo

lxc-gentoo: Linux Containers Gentoo Guest Template Script
http://globalcitizen.github.com/lxc-gentoo
GNU General Public License v3.0
85 stars 32 forks source link

Don't prompt for mirror if local cache present #50

Open globalcitizen opened 11 years ago

globalcitizen commented 11 years ago

Seems a waste of time!

specing commented 10 years ago

It is not if you want up-to-date stuff. Should add a command-line switch telling lxc-gentoo how old of a cache we are tolerating.

tbh the entire fetching subsystem is in grave need of some refactoring

globalcitizen commented 10 years ago

Agreed... I hit issues with this recently.

The portage snapshot is typically undated except at the filesystem's own metadata layer so that could be a bit of a hassle. Instituting a yes/no cache update when either the stage3 or portage snapshot is over some reasonable number of days old (eg. 30) might be enough.

Care should be taken such that changes to the interface to support better cache handling do not impact on current automated execution paths. This may require a catch-all "quiet mode" or similar to be added.