Skip to content

Commit

Permalink
fixed: patch error for some files if package is reinstalled
Browse files Browse the repository at this point in the history
  • Loading branch information
kwindrem committed Sep 29, 2024
1 parent 2cf9038 commit 9db248a
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 14 deletions.
26 changes: 15 additions & 11 deletions HelperResources/CommonResources
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,9 @@ updateActiveFile ()
fi

# the location of the active file must exist
#### TODO: accommodate moved style sheet or skip file (not an error) if active does not exist ?????????
local pathToActive=$(dirname "$activeFile")
if [ ! -e "$pathToActive" ]; then
logMessage "WARNING path to $activeFile does not exist - skiping patch"
######### setInstallFailed $EXIT_FILE_SET_ERROR "path to $activeFile does not exist"
logMessage "path to $activeFile does not exist - skiping patch"
return 1
fi

Expand All @@ -491,9 +489,13 @@ updateActiveFile ()
# then in FileSets (previous location of version-indepencent files)
elif [ -e "$pkgFileSets/$baseName" ]; then
sourceFile="$pkgFileSets/$baseName"
# nothing found - can't continue
else
setInstallFailed $EXIT_FILE_SET_ERROR "no soure file for $baseName"
# if directory for file exists but no sourceFile - can't continue
if [ -e $( dirname "$activeFile" ) ]; then
setInstallFailed $EXIT_FILE_SET_ERROR "no soure file for $activeFile"
else
logMessage "enclosing directory for $activeFile not found - skipping update"
fi
return 1
fi
fi
Expand Down Expand Up @@ -1558,8 +1560,7 @@ if [ $scriptAction != 'UNINSTALL' ]; then
rm -f "$currentPatchFile"

if ! [ -e "$activeFile" ] ; then
#### TODO: ??? patchErrors+=( "$baseName no active file for patch" )
logMessage "WARNING: $baseName no active file for patch - skipping"
logMessage "no active file $activeFile - skipping patch"
continue
fi

Expand All @@ -1579,16 +1580,19 @@ if [ $scriptAction != 'UNINSTALL' ]; then
fi

patchOk=false
skipPatch=false

if $thisPackageInList; then
# only this package modified active file
# ignore any previous patch and patch .orig file
if ! $otherPackagesInList ; then
# only this package modified active file
# ignore any previous patch and patch .orig file
if [ -e "$activeFile.orig" ]; then
cp "$activeFile.orig" "$tempActiveFile"
patchOk=true
# use active file if no .orig exists
else
patchErrors+=( "$baseName no .orig file for patch" )
cp "$activeFile" "$tempActiveFile"
patchOk=true
fi
# this and others have modified the active file
# attempt to remove the previous patch for this package
Expand Down Expand Up @@ -1635,7 +1639,7 @@ if [ $scriptAction != 'UNINSTALL' ]; then
patchErrors+=( "$baseName patch unsuccesful" )
rm -f "$forwardPatched"
fi
else
elif ! $skipPatch ; then
patchErrors+=( "$baseName no patch source" )
fi
done # for activeFile
Expand Down
2 changes: 1 addition & 1 deletion ReadMe
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ By far, the easiest way to install SetupHelper is the "blind install"
Another way to install SetupHelper is to use the following from the command line of the GX device:

wget -qO - https://github.com/kwindrem/SetupHelper/archive/latest.tar.gz | tar -xzf - -C /data
mv /data/SetupHelper-latest /data/SetupHelper
mv -f /data/SetupHelper-latest /data/SetupHelper
/data/SetupHelper/setup

Once SetupHelper is installed, updates to it and other packages can be performed through the GUI
Expand Down
2 changes: 1 addition & 1 deletion blindInstall/SetupHelperVersion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8.20
v8.21
3 changes: 3 additions & 0 deletions changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v8.21:
fixed: patch error for some files if package is reinstalled

v8.20:
add support for v3.50~22 (HTML style sheet in different location)
add dbus-pi package to defaults list
Expand Down
Binary file modified venus-data-UninstallPackages.tgz
Binary file not shown.
Binary file modified venus-data.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8.20
v8.21

0 comments on commit 9db248a

Please sign in to comment.