dCore Import Debian Packages to Mountable SCE extensions > dCore X86
sce-update, possible quick check feature
nitram:
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: ---sudo md5sum "${DEBINFO}".tar.gz >> /tmp/"$TARGET".sce.md5.list
--- End code ---
--- Code: ---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
--- End code ---
emelfm.sce.md5.list file contents after import:
--- Code: ---61b2f7d81ad473e3ffe9a47c5a750344 glib1.tar.gz
5ed16326225ff7c35742e5318fd298a8 gtk1.tar.gz
a17f00793e04af874a8a2ce40953a99d emelfm.tar.gz
--- End code ---
/sce:
--- Code: ---tc@box:/mnt/sdb4/tce/sce$ ls | grep emelfm
emelfm.sce
emelfm.sce.debinx
emelfm.sce.md5.list
emelfm.sce.md5.txt
--- End code ---
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.
Jason W:
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.
nitram:
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.
Navigation
[0] Message Index
[*] Previous page
Go to full version