RFC: reducing wasted disk space from addon files

Alexandre Julliard julliard at winehq.org
Wed Mar 27 11:18:53 CDT 2019


Hans Leidekker <hans at codeweavers.com> writes:

> On Sat, 2019-03-16 at 01:28 +0100, Hans Leidekker wrote:
>> On Fri, 2019-03-15 at 18:09 -0500, Vincent Povirk wrote:
>> > On Fri, Mar 15, 2019 at 5:05 PM Hans Leidekker <hans at codeweavers.com> wrote:
>> > > That shouldn't be needed. All they'd need to do is run the installer
>> > > with MONOBASEDIR set to the desired shared directory. The first install
>> > > would create it, the second would increase the reference count. Removal
>> > > of the package or an upgrade would decrement the reference count.
>> > 
>> > A reference count won't work if a prefix is deleted or copied.
>> > Currently, Wine has no official tools for either task.
>> 
>> Deleting or copying wouldn't hurt either. If you want to delete
>> prefixes at will without caring about the shared prefix you should
>> store the shared directory in the first prefix. If you copy a prefix,
>> that means the refcount could drop to zero before all users are gone.
>> The guard against that is to run a repair.
>> 
>> > Old versions would be left in place until all prefixes that use them
>> > are upgraded, even if the old Wine that needs them no longer exists.
>> 
>> No, the last upgrade would have deleted it.
>
> Here's what a reference counted shared directory would look like.
> The first patch implements the needed custom actions in a Wine dll,
> which can be cross compiled with MinGW. 

It doesn't seem right to add a dll that doesn't exist on Windows. Also I
don't think you can do such reference counting reliably. File locking is
not supported on all filesystems, and you won't be able to cleanup if
the app dies in the middle of an update.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list