Package cache

2007-08-18 Thread Gonsolo
Hi!

Would it be feasible to add something like a package cache to Debian?

This way only a minimal Debian system would be installed locally on
the hard disk. All other packages are fetched only when used. For example,
user Joe sets his package cache to 400MB and installs Openoffice.
The installation lasts one second because only a few symlinks are created.
When Joe uses Openoffice for the first time, All necessary files are fetched
from the Internet and put in the package cache. So the first startup will be
slow. The next time all necessary files are on the disk and Openoffice starts
as usual.

The package cache is managed with a last-recently-used (LRU) strategy.
So all the packages Joe normally uses are in the cache. When the cache
overflow a package is deleted on the disk. Joe can "pin" some packages
into the cache to avoid statup slowdown.

With a package cache a normal Debian installation would not be hundreds
of megabytes of gigabytes after a few months/years of usage (package
installation) but only 400MB and Joe doesn't have to manually remove
packages when his hard disk is full.

I know disk space is cheap but having hundreds of megabytes wasted for
gnome pixmaps I never see or fonts i never use is annoying.

Thanks,

Gonsolo


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Package cache

2007-08-22 Thread Gonsolo
Hi!

> What you describe is not a cache and even less a _package_ cache.

>From Wikipedia:
"In computer science , a *cache* (...)is a collection of data duplicating
original values stored elsewhere or computed earlier, where the original
data is expensive to fetch (due to slow access time ) or to compute,
relative to the cost of reading the cache."

So I think what I describe *is* a cache of Debian packages.
They are stored elsewhere (on the Internet), and it is duplicated data, namely
packages on the local hard disk.

>> user Joe sets his package cache to 400MB and installs Openoffice.
>> The installation lasts one second because only a few symlinks are
>> created.
>
> Symlinks to what?

As Mr. Sliepen pointed out the same can be achieve with a FUSE daemon.
I thought of symlinks pointing to an executable that load the necessary packages
and corrects the symlink.
For example:
1. Blender not installed
2. User types "blender"
3. "blender" is a symlink to /usr/bin/oops-package-not-installed
4. Binary oops-package-not-installed used apt to load/install blender
5. blender is run
optional:
6. oops-package-not-installed notes that the packages installed use
more than 400MB
on the local hard disk so it decides to deinstall package gimp because
it hasn't been used
for four years (and it's only 2D, of course! :) )

> If you want to keep the files aside but ie. compressed than you
> should use a compressing filesystem.

The whole Debian distribution compressed is still big. :(

> But if you want something
> working on access, expect it to perform very bad. Ie. if you want to
>  install the files from original package files on access, then you
> need some daemon that fetches them, you need a kernel-based add-on to
>  interrupt the file IO when the application touches the file
> (everything including stat, not just reading), and you need to make
> sure that your network is always in perfect state.

Yes, it is targeted to desktops always online. Traveling notebook users
shouldn't certainly use it.

> IMHO those are just too many unsafe requirements that make the whole
> approach insane on this level of an operating system.

Why? As others pointed out, it nearly can be done.

> There is too much risk to break the system when doing this without
> sane control, and your proposal does not sound convincing. At least
> the package with

The system is "installed" on the Internet. As others pointed out there is
a file (Contents.gz) where all files are listed. So I don't think there is a
problem since the technology is already there. It's just a matter of
making it easy to use.

> Eduard.

Thanks for your reply,

Gonsolo


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Package cache

2007-08-22 Thread Gonsolo
Thanks to all,

0install.net is exactly what I am looking for.
One thing is that this system is "per user".
Having something like that "per computer" would be
nice. That is, the admin sets up the computer with
_all_ packages and the user can use _all_ packages.
(Except that _not_ all packages are installed).

Thanks,

Gonsolo


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]