[leaf-devel] apkg -u (upgrade)

2006-06-29 Thread Cédric Schieli
Hello list, I've implemented a simple upgrade command for apkg : non local files and pristine local files are overwritten, modified local files are preserved. Full script and patch against current CVS can be found at : http://leaf.newel.net/~cedric/work_in_progress/apkg Regards, Cedric Using

Re: [leaf-devel] apkg -u (upgrade)

2006-06-29 Thread Eric Spakman
Hello Cedric, Very interesting! I still have some problems understanding how it exactly works ;) Why is the following piece added? else tar -zxpf $pth create_sha1 $pkg fi Regards Eric I've implemented a simple upgrade command for apkg : non

Re: [leaf-devel] apkg -u (upgrade)

2006-06-29 Thread Eric Spakman
Hello Cedric, To reply to myself, I understand. If the package has no config files it can just be installed. A possible problem with this implementation is that programs that are running (like daemons) are not stopped before and started after and upgrade. I still have some problems

Re: [leaf-devel] apkg -u (upgrade)

2006-06-29 Thread Cédric Schieli
Hello Eric, I still have some problems understanding how it exactly works ;) Why is the following piece added? else tar -zxpf $pth create_sha1 $pkg fi This is used when there's no pkg.local file. In this case, there's no need to try

Re: [leaf-devel] apkg -u (upgrade)

2006-06-29 Thread Cédric Schieli
Hello Eric, A possible problem with this implementation is that programs that are running (like daemons) are not stopped before and started after and upgrade. Yes, we'd need some kind of preinst/postinst script to handle that. There's also a problem with files which no longer exist (and

Re: [leaf-devel] apkg -u (upgrade)

2006-06-29 Thread Eric Spakman
Hello Cedric, A possible problem with this implementation is that programs that are running (like daemons) are not stopped before and started after and upgrade. Yes, we'd need some kind of preinst/postinst script to handle that. Or look for an init.d file in the package, like done in

Re: [leaf-devel] apkg -u (upgrade)

2006-06-29 Thread Cédric Schieli
Hello Eric, There's also a problem with files which no longer exist (and should be removed), as we don't have a .list anymore (it may be created at install/upgrade time). There is some code in linuxrc (currently commented out) that would create a .list file on the fly. It's commented out