WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: sce-update, possible quick check feature  (Read 10626 times)

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: sce-update, possible quick check feature
« Reply #45 on: January 27, 2016, 03:01:22 PM »
Just been playing around a bit with scripts, you wanted ideas, didn't expend much effort as i'm likely off base, logic flaw and obviously don't understand the entire update process. The new DEBINX system is good but everytime there's the slightest update/change the long version SCE update check is initiated. Not sure if this would be any better than the current method.

Just a cursory emelfm pre-built example. Adding this to ~line 500 of deb2sce creates a /tmp/emelfm.sce.md5.list file:
Code: [Select]
sudo md5sum "${DEBINFO}".tar.gz >> /tmp/"$TARGET".sce.md5.list


Code: [Select]
if [ -f "${DEBINFO}".tar.gz ] && [ `/bb/md5sum "${DEBINFO}".tar.gz | cut -f1 -d" "` == `grep "^$DEBINFO": /tmp/PREBUILTMD5SUMLIST | cut -f2 -d" "` ]; then
echo "${DEBINFO}: `/bb/md5sum "${DEBINFO}".tar.gz | cut -f1 -d" "`" >> "$IMPORT"/"$TARGET"/usr/local/sce/"$TARGET"/"$TARGET".md5sum  
echo "Merging "${DEBINFO}""
sudo md5sum "${DEBINFO}".tar.gz >> /tmp/"$TARGET".sce.md5.list
tar xf "${DEBINFO}".tar.gz -C "$IMPORT"/"$TARGET"
if [ "$?" != 0 ]
then
echo "Failed merging of "${DEBINFO}".tar.gz."
echo "${DEBINFO}".tar.gz  >> /tmp/import.log
fi 


emelfm.sce.md5.list file contents after import:
Code: [Select]
61b2f7d81ad473e3ffe9a47c5a750344  glib1.tar.gz
5ed16326225ff7c35742e5318fd298a8  gtk1.tar.gz
a17f00793e04af874a8a2ce40953a99d  emelfm.tar.gz

/sce:
Code: [Select]
tc@box:/mnt/sdb4/tce/sce$ ls | grep emelfm
emelfm.sce
emelfm.sce.debinx
emelfm.sce.md5.list
emelfm.sce.md5.txt

Each SCE would have this emelfm.sce.md5.list file in /sce, which would contain md5sums of every dependency contained in the extension. Some fancy grep, sed loop could relatively quickly compare individual dependency md5sums against NEWDEBINX, first difference triggers re-import. The current NEWDEBINX format is, however, inconsistent so it wouldn't work well at present. Just a thought, thanks.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: sce-update, possible quick check feature
« Reply #46 on: January 27, 2016, 04:08:50 PM »
Actually, what you have just spoke of is  the long way, the correct order of debinx files is checked against. 

Load emelfm.sce and check the contents of /usr/local/sce/emelfm/emelfm.md5sum, that is the md5sum data that is used.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: sce-update, possible quick check feature
« Reply #47 on: January 27, 2016, 05:24:49 PM »
I see, thanks! Storing this md5sum file outside the *.sce probably not beneficial for speed as the extension must only be mounted to retrieve the md5sum file, which takes only fraction of a second, as opposed to a slow unsquash. So i guess barking up wrong tree. Fun delving deeper into scripts, now at importupdatecheck. Thanks.