[Nix-dev] Dealing with self-updating packages

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Tue Sep 30 16:11:39 CEST 2014


On 09/19/2014 07:42 PM, Russell O'Connor wrote:
> Dear nixers,
> 
> I'm working on packaging gsutil <
> https://developers.google.com/storage/docs/gsutil>.  This software comes
> with a "feature" that it can update itself by downloading the latest
> version and replacing itself in place.
> 
> Obviously this isn't going to work, and indeed when I force an update it
> fails with:
> 
> $ gsutil update -f
> Checking for software update...
> This command will update to the "4.6" version of
> gsutil at
> /nix/store/4p33in0gqspwv2f4w2q0fq03cvj1iq9c-gsutil-4.6/share/gsutil
> Proceed? [y/N] y
> Copying gs://pub/gsutil.tar.gz...
> Downloading file://gsutil.tar.gz:                                2.1 MB/2.1
> MB
> Downloading file://gsutil.tar.gz:                                2.1 MB/2.1
> MB
> OSError: Read-only file system.
> 
> My question is, how do you guys generally deal with this sort of software?
> 
> I was thinking of creating a patch that will disable the update
> functionality.  I would try to keep the notification of newer versions are
> available, but instead direct the user to update their nix-channel and/or
> notify the maintainer to update the version in nixpkgs.
> 
> Thanks.
> 
> 

I believe the general idea is to not do anything about it and trust the
users to not try to update. It seems less hassle than patching it out
and I haven't seen anyone complain yet. I would only bother patching
stuff out iff the software relied on being to update itself and you
could not ask it to do so. I'd also give upstream a good earful first.

PS: Your e-mail only came through today.

-- 
Mateusz K.


More information about the nix-dev mailing list