Hi netnomad. Last check all sce-import options are in --help, the -R option was added some time ago. The SCE scripts are in /usr/bin, let me know if you see a case option not listed in --help.
Just learning and having fun, if anything is inaccurate please forgive
Seems importupdatecheck is only aware whether Recommended or Suggested packages were installed, not whether the -RS flags were used [1].
## Determine if SCE exists in SCE dir, SCE/update dir, or is mounted and then mount.
if [ -f "$SCEDIR"/update/"$SCE".sce ]; then
[ -d /tmp/sceupdatetest ] || mkdir /tmp/sceupdatetest
sudo busybox mount "$SCEDIR"/update/"$SCE".sce /tmp/sceupdatetest
DATADIR=/tmp/sceupdatetest/usr/local/sce/"$SCE"
FILE=/tmp/sceupdatetest/usr/local/sce/"$SCE"/"$SCE".md5sum
FILEDATA=/tmp/sceupdatetest/usr/local/sce/"$SCE"/"$SCE"-data.md5sum
RECOMMENDS=/tmp/sceupdatetest/usr/local/sce/"$SCE"/recommends
SUGGESTS=/tmp/sceupdatetest/usr/local/sce/"$SCE"/suggests
elif sudo busybox mount | grep "/tmp/tcloop/$SCE " > /dev/null 2>&1; then
DATADIR=/tmp/tcloop/"$SCE"/usr/local/sce/"$SCE"
FILE=/tmp/tcloop/"$SCE"/usr/local/sce/"$SCE"/"$SCE".md5sum
FILEDATA=/tmp/tcloop/"$SCE"/usr/local/sce/"$SCE"/"$SCE"-data.md5sum
RECOMMENDS=/tmp/sceupdatetest/usr/local/sce/"$SCE"/recommends
SUGGESTS=/tmp/sceupdatetest/usr/local/sce/"$SCE"/suggests
elif [ -f "$SCEDIR"/"$SCE".sce ]; then
DATADIR=/tmp/sceupdatetest/usr/local/sce/"$SCE"
[ -d /tmp/sceupdatetest ] || mkdir /tmp/sceupdatetest
sudo busybox mount "$SCEDIR"/"$SCE".sce /tmp/sceupdatetest
FILE=/tmp/sceupdatetest/usr/local/sce/"$SCE"/"$SCE".md5sum
FILEDATA=/tmp/sceupdatetest/usr/local/sce/"$SCE"/"$SCE"-data.md5sum
RECOMMENDS=/tmp/sceupdatetest/usr/local/sce/"$SCE"/recommends
SUGGESTS=/tmp/sceupdatetest/usr/local/sce/"$SCE"/suggests
fi
Adding this just before mksquashfs command towards the bottom of deb2sce:
else
touch ""$TARGET"/usr/local/tce.installed/"$TARGET"_import_data"
echo "==== "$TARGET" ====" > "$TARGET"/usr/local/tce.installed/"$TARGET"_import_data
echo "Import date: `date`" >> "$TARGET"/usr/local/tce.installed/"$TARGET"_import_data
if [ -f /tmp/.recommends ]; then
echo "Imported with -R option." >> "$TARGET"/usr/local/tce.installed/"$TARGET"_import_data
fi
if [ -f /tmp/.suggests ]; then
echo "Imported with -S option." >> "$TARGET"/usr/local/tce.installed/"$TARGET"_import_data
fi
mksquashfs "$TARGET" "$TCEDIR"/sce/"$TARGET".sce -noappend
...and running sce-import -RS nano produces a usr/local/tce.installed/nano_import_data file:
==== nano ====
Import date: Wed Sep 21 06:39:57 UTC 2016
Imported with -R option.
Imported with -S option.
Unsure whether /tce.installed/ is appropriate for such a file, probably superfluous anyway. Something like this or simpler could be used to read case options for an update re-import.
[1] Importing nano with -RS flags, there were no Recommended packages. So the SCE contains only a /tmp/tcloop/usr/local/sce/$SCE/suggests file. The absent recommends file, therefore, misleads both the user and importupdatecheck into thinking the -R option was not used during the initial import, even though it was. Maybe future bug if Debian/Ubuntu add Suggested and Recommended packages between update checks, not sure they do that.