From: Joachim K. <joa...@i1...> - 2003-10-28 13:25:03
|
Joachim Kupke: > Besides, there are some issues with arguably higher priority: [...] Oh, and not to forget: The issue of accessing outdated sites, that is the scenario where: * Alice accesses /uri/0install/site.dom on Oct 28 and finds /uri/0install/site.dom/sitelib/Linux-ix86/1.2.3{,-or-later} * Bob accesses /uri/0install/someapp.com on Nov 28 and wants to execute the brand-new /uri/0install/someapp.com/app/Linux-ix86/latest/AppRun which is linked against /uri/0install/site.dom/sitelib/Linux-ix86/1.2.4-or-later/blahblah and therefore fails to run unless - either Bob uses a different machine (which is unlikely to be his favored choice) - or Bob issues "0refresh" manually, even though he may never have heard about the command line or zero install in particular - or /lib/ld-linux* does so, even though it is definitely not its job and we should probably not have the dynamic loader do zero install specific things - OR: 0refresh is executed on a regular basis, say once in 24 hours, as to give "absolutely aggressive caching" up. The last option sounds like the most sensible one. It should be made clear that this means that if a site chooses to withdraw a certain file from its zero install repository, applications may cease working, and a user is more at the mercy of some packager, application author, or the like. I would therefore suggest to have 0build issue intimidating warnings to a packager if they dare removing files. Things can still break, of course, by replacing files (or symlinks). But in order to circumvent this, you would probably have to use (and to enforce usage of) a versioned file system, like in: /uri/0install/<site name>/<mtime>/<arbitrary hierarchy> where <mtime> would be (say, the decimal representation of) the time at which 0build was called, and where /uri/0install/<site name>/current would be a symlink always pointing to the most current version of the zero install tree. Regular files that remain unchanged between two runs of 0build can be dealt with by setting symlinks appropriately, that is: if you already have /uri/0install/site.dom/1066479254/somefile and "now" is 1067346879 (seconds after Jan 1, 1970 UTC...), and somefile has not changed, then you would have /uri/0install/site.dom/1067346879/somefile point to ../../1066479254/somefile. (Another run of 0build will create another link to the same file, not to the link, in order not to inflict too many levels of indirection.) The upshot of this is that a client can decide never to remove old versions of files (unless it is known that they are definitely no longer used) in order to facilitate keeping an application runnable with a library disappearing. I am not sure whether we would want all that fuss. Probably not. Joachim -- Public PGP key available; see http://www.kupke.za.net/public-pgp-key PGP Fingerprint: 87 F8 F2 46 59 39 CA E4 0D D4 C7 EE 62 04 E2 C9 |