WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: One command update of the sce directory.  (Read 21301 times)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
One command update of the sce directory.
« on: November 04, 2014, 10:42:06 PM »
I am now testing my first run of an automated "one command" sce directory update.  Updating SCE"s that are made from list files, those that use .dep files and depend on other SCE's, as well as standard packages.  It would not be possible without the creating the SCE in $SCEDIR/update if the SCE was mounted and in use, nor if we did not use and respect existing .dep or .lst files for dependencies and file lists used in the initial creation of the SCE.  And for these three concepts we have JLS to thank, I honestly was hesitant to incorporate each one of them as I am resistent to change, but looking back I am glad I did.

This should amount to a time and troubleshooting saver especially for those using more unstable repos like the current Jessie or Trusty.  One command and you know your install is square again.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: One command update of the sce directory.
« Reply #1 on: November 05, 2014, 11:33:05 PM »
Testing and putting some finishing touches on this concept.  Next update will support a 'one command' update of the sce directory for standard Debian packages, SCE's that were imported via a list file, and either of those that make use of a .dep file to use one or more existing SCE's as a dependency..

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: One command update of the sce directory.
« Reply #2 on: November 09, 2014, 10:33:05 PM »
I am considering working an update function into importsce and the existing deb* scripts instead of having a separate update script that would have to duplicate a whole lot of what is existing in the others.  "importsce -u" would copy an existing sce to the normal merging directory, then only what has been updated in Debian compatible repos or our prebuilt section or in the startup scripts and *-data.tar.gz will be merged.  If you have a huge sce that has only one package from Debian updated since you imported that sce, then only that one package will be re-merged to the updated sce.  It will some time calculating the md5sums, but should overall be a huge time and hardware energy saver.

EDIT:  A simple change to the getMd5sum function that uses the same logic as determining deps or size has brought performance from about one second per package to 865 .deb files in my import/debs directory getting their md5sums checked in 16 seconds.  So an sce made from 865 packages would be updated in the time it takes to unpack it, 16 seconds to check for updated debs, downloading the startup scripts, downloading/merging of any updated debs, then repacking.  If few updated debs or prebuilts, then very fast update.  I think I will use a list of available startup scripts that is downloaded once per import session the way we are now using a list of *-data.tar.gz files to save time and bandwidth.  With these changes it will probably be next week by the time I have a public testing release.
« Last Edit: November 09, 2014, 10:48:55 PM by Jason W »

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: One command update of the sce directory.
« Reply #3 on: November 10, 2014, 02:43:02 AM »
hi jason,

well thought out concept!
i'm looking forward testing this new feature :)

keep on hacking.
« Last Edit: November 10, 2014, 02:45:01 AM by netnomad »

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 337
Re: One command update of the sce directory.
« Reply #4 on: November 10, 2014, 10:23:47 AM »
+1  :)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: One command update of the sce directory.
« Reply #5 on: November 12, 2014, 10:33:27 AM »
There are some issues I did not forsee in mounting and updating an extension in place.  One of them and the deal killer is the potential for stale files when files have been changed in the Debian package.  This would most likely happen in Debian testing or Ubuntu.  I would rather stay with a dependable and solid result of a re-import than risk breakage from file conflicts.  That and dependencies of packages can change, though that could be handled it would mean basically having to go through the entire import process anyway.  Also, massive code changes to importsce and it's support scripts would have to occur. 

Updating is not something that has to happen on a frequent basis, unless using a testing repo that has not stabilized.  But in any case, I am working on some streamlining of the import process to make it even quicker as well as the 'one command' update of existing SCE's.  Though it may take more time than an update in place method, it can be done unattended requiring little effort from the user and reliably update existing SCE's whether they are from a file list, have dependency SCE's or are a custom built package.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: One command update of the sce directory.
« Reply #6 on: November 13, 2014, 01:14:04 PM »
updatesce is now in base.  Use as follows:

$ updatesce

$ updatesce -r

This will bring up a menu of existing SCEs to choose from.  The second one will use the -r RAM option.  The non-interactive and size options are by default.  The update session will stop at the point when it is found you do not have enough room to update the next SCE.  You can choose more than one, up to all.

$ updatesce file

This will update the SCE named file.

$ updatesce all

This will update all the existing SCEs in your SCE directory.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: One command update of the sce directory.
« Reply #7 on: November 13, 2014, 01:55:05 PM »
Hi Jason and the others

issuing updatesce I get permission denied on /tmp/select.ans
If I chown that file I get
libmatroska5_1.3.0-2_i386.deb is not available as a package.  Exiting...

that file is asked from a deb list when I imported minitube

ps minitube doesn t contain the minitube binary
dCore user

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: One command update of the sce directory.
« Reply #8 on: November 13, 2014, 02:43:00 PM »
hi jason,

i get for a couple of deb2sce-scripts following error messages:

Merging Tiny Core custom start script for libgdk-pixbuf2.0-0: libgdk-pixbuf2.0-0.deb2sce
cat: /tmp/libgdk-pixbuf2.0-0.deb2sce: No such file or directory
rm: cannot remove '/tmp/libgdk-pixbuf2.0-0.deb2sce': No such file or directory

dito for the following deb2sce-scripts.

as a result i get an unusable sce-package that causes permission errors.
« Last Edit: November 13, 2014, 02:56:50 PM by netnomad »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: One command update of the sce directory.
« Reply #9 on: November 13, 2014, 03:21:06 PM »
JLS - I think I have a fix for yours.

netnomad - there seems to be an issue with the tinycorelinux.net network.  That would produce your error, I am getting it too off and on.  Lets wait until the network issue is resolved, I would need it working to upload a fix anyway.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: One command update of the sce directory.
« Reply #10 on: November 14, 2014, 01:11:55 PM »
...
Merging Tiny Core custom start script for libgdk-pixbuf2.0-0: libgdk-pixbuf2.0-0.deb2sce
cat: /tmp/libgdk-pixbuf2.0-0.deb2sce: No such file or directory
rm: cannot remove '/tmp/libgdk-pixbuf2.0-0.deb2sce': No such file or directory
...
md5sum: firmware-all.tar.gz.md5.txt: No such file or directory
...

there is no change, always the same behavior :(
the result are broken packages :(
« Last Edit: November 14, 2014, 01:37:25 PM by netnomad »

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 337
Re: One command update of the sce directory.
« Reply #11 on: November 14, 2014, 04:13:48 PM »
Hi,

I have tried updatesce with my first big SCE (openbox, wireless, xfe, alsa, cups, Conky, etc.) having a .lst and .dep associated files and the updatesce worked flawless. No errors.

Now I will updatesce all my others big sce's (multimedia, office, work, mail, etc.) but surely works perfect.

Many thanks for the effort. It makes the maintenance very easy.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: One command update of the sce directory.
« Reply #12 on: November 14, 2014, 05:40:19 PM »
netnomad - I have not had time today to upload the fix now that the network is back up, I will be able to when I get back to my machine in the next day or so.


Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: One command update of the sce directory.
« Reply #13 on: November 14, 2014, 08:18:34 PM »
Netnomad - I have adjusted and uploaded the x86 dCore*.gz files.  Please download and test, I will add to git later.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: One command update of the sce directory.
« Reply #14 on: November 15, 2014, 04:39:24 AM »
hi jason,

i tried and tested
http://tinycorelinux.net/5.x/x86/release_candidates/dCore-jessie/dCore-jessie.gz.md5.txt
a5a407a7557405532af256c46d8865dc  dCore-jessie.gz

btw
the boot-message shows as the version i guess something like 5.14.11.13...

sorry for your efforts, but i get the same results, error messages like:

Merging Tiny Core custom start script for python2.7-minimal: python2.7-minimal.deb2sce
cat: /tmp/python2.7-minimal.deb2sce: No such file or directory
rm: cannot remove '/tmp/python2.7-minimal.deb2sce': No such file or directory
Merging python2.7-minimal
Merging Tiny Core custom start script for python2.7: python2.7.deb2sce
cat: /tmp/python2.7.deb2sce: No such file or directory
rm: cannot remove '/tmp/python2.7.deb2sce': No such file or directory
Merging python2.7
Merging Tiny Core custom start script for python: python.deb2sce
cat: /tmp/python.deb2sce: No such file or directory
rm: cannot remove '/tmp/python.deb2sce': No such file or directory

thank you for your help and commitment,
thank you for your hacking :)

« Last Edit: November 15, 2014, 05:03:05 AM by netnomad »