dCore Import Debian Packages to Mountable SCE extensions > dCore X86

sce-update, possible quick check feature

(1/10) > >>

nitram:
sce-update has been under revision, so just food for thought or maybe future feature. Running sce-update is CPU intensive and time consuming, especially on old hardware, anticipate longish even on newer system. Takes ~10 minutes with 100% processor use to systematically check 14 SCEs for updates, 6 of which are dCore pre-built that rarely change...even if the DEBINX hasn't changed.

To help with testing got into habit of backing up old DEBINX files, running diff against new versions to anticipate update flags. If this feature was built-in, a quick preliminary update check could take seconds not minutes.

When a user runs sce-update, why not archive the old DEBINX (eg. debian_jessie_main_i386_Packages.old), new DEBINX downloaded, run diff, depending on outcome:

1. Neither main or security package indexes have changed since last sce-update, SCE updates unlikely, quit or perform thorough check anyway?
2. Both the main and security package indexes have changed since last sce-update, perform thorough check?
2. The main package index has changed since last sce-update, SCE updates undetermined, perform thorough check?
3. The security package index has changed since last sce-update, security updates may be pending, perform thorough check?

Of course the non-interactive option would not pause for this. Running sce-import should also not automatically backup DEBINX, just when sce-update is run. If the user inadvertently deleted the archived DEBINX.old file(s), then sce-update would just backup the new and run through. Total backed up DEBINX files only ~10mb, potentially lots of time and CPU cycles saved checking updates.

My logic may be flawed or require revision. Maybe the DEBINX files change so frequently that adding such a feature is just a waste of time and effort. Just a thought, thanks.

Jason W:
We have to consider the debinx.* files in /etc/sysconfig/tcedir/import/debinx, as well as the PREBUILTMD5SUMLIST and PKGDATAFILEMD5SUMLIST.  But here is a simple way to tell if anything has changed.  It takes .05 seconds for me to run " cat debinx.* *Packages /tmp/PREBUILTMD5SUMLIST /tmp/PKGDATAFILEMD5SUMLIST  > NEWFILE" to get a file of the cobined needed lists to check for change.  When running debGetEnv again, if no change in the debinx or the prebuilt stuff, then no md5sum change of the resulting file.  Any changes mean a change in the md5sum, of course, as well as any added or deleted /opt/debextra entries.

Costing .05 seconds and less than 15mb is small compared to sce-update running all the way through to determine if even one package anywhere has changed.  Should be simple for me to implement.  Thanks for the idea.

nitram:

--- Quote from: Jason W on January 11, 2016, 09:08:58 PM ---Costing .05 seconds and less than 15mb is small compared to sce-update running all the way through to determine if even one package anywhere has changed.  Should be simple for me to implement.  Thanks for the idea.

--- End quote ---
My CPU says thanks for knowing how to implement this stuff. Wondered how prebuilt packages could be captured. Will gladly test when available.

Jason W:
Availble now, please test.

Jason W:
Oh, and to test the concept the first time without having to run a full sce-update, just do CTRL-C after the updating begins, and then run sce-update again.  Should turn up no updates without having to run a full sce-update.

EDIT: Found a bug, will test and upload tonight.

EDIT2 per bugfix: After commencing update and CTRL-C, then cd /etc/sysconfig/tcedir/import
then
sudo cp NEWDEBINX OLDDEBINX

and re-run sce-update for a quick test and should return no updates.

Navigation

[0] Message Index

[#] Next page

Go to full version