Skip to content

Commit

Permalink
fixed: PackageManager does not exit for reboot
Browse files Browse the repository at this point in the history
  • Loading branch information
kwindrem committed Apr 30, 2024
1 parent ac3d7ef commit c0613a5
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 16 deletions.
7 changes: 4 additions & 3 deletions HelperResources/CommonResources
Original file line number Diff line number Diff line change
Expand Up @@ -1633,9 +1633,10 @@ if ! [ -z "$fileListPatched" ];then
fi
rm "$previousPatchFile"
fi
# this package has not previously modified the active file but other packages may have
# (if no others, there is no .orig file)
# patch active file
# this package has not previously modified the active file
# other packages have modified the active file
# if not, there is no .orig file
# either way, patch the active file
else
cp "$file" "$tempActiveFile"
patchOk=true
Expand Down
7 changes: 3 additions & 4 deletions PackageManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -4219,9 +4219,8 @@ def main():

# this runs in the background and will CONTINUE after PackageManager.py exits below
try:
logging.critical ("finishing up in packageManagerEnd.sh")
proc = subprocess.Popen ( command, bufsize=-1, stdout=subprocess.PIPE, stderr=subprocess.PIPE )
proc.communicate () # output ignored
logging.warning ("finishing up in packageManagerEnd.sh")
proc = subprocess.Popen ( command )
except:
logging.critical ("packageManagerEnd.sh failed")

Expand All @@ -4230,7 +4229,7 @@ def main():
time.sleep (5.0)
DbusIf.RemoveDbusService ()

logging.critical (">>>> PackageManager exiting")
logging.warning (">>>> PackageManager exiting")

# program exits here

Expand Down
2 changes: 1 addition & 1 deletion blindInstall/SetupHelperVersion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8.0~28
v8.0~29
1 change: 1 addition & 0 deletions changes
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ v8.0: (beta)
replace OS's patch with one that handles more cases (eg, 0 context) and options
fixed: PackageManager hangs on Python 2 (Venus OS prior to v2.80)
fixed: some patching errors
fixed: PackageManager does not exit for reboot

v7.18:
fixed: only first service is uninstalled
Expand Down
18 changes: 11 additions & 7 deletions packageManagerEnd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,20 @@ while [ $# -gt 0 ]; do
done

# allow PackageManager exit before doing anything
# insure the PackageManager service doesn't restart when it exits
# it will start up again after the reboot if it is still installed
if $shUninstall || $reboot ; then
svc -o "/service/PackageManager"
service="/service/PackageManager"
# insure the PackageManager service doesn't restart when it exits
# it will start up again after the reboot if it is still installed
# only issue svc -o if PM is running or it will be started !!!
if [ $(svstat "$service" | awk '{print $2}') == "up" ]; then
svc -o "$service"
fi
while true; do
if [ -z $( pgrep -f PackageManager.py ) ]; then
if [ -z "$( pgrep -f PackageManager.py )" ]; then
break
else
logMessage "waiting for PackageManager.py to exit"
sleep 1
sleep 5
fi
done
fi
Expand All @@ -95,9 +99,9 @@ if $shUninstall ; then
fi

if $reboot ; then
logMessage ">>>> rebooting to complete package un/install"
logMessage ">>>> REBOOTING ..."
# TODO: add -k for debugging - outputs message but doesn't reboot
shutdown -r now "rebooting to complete package un/install"
shutdown -r now "PackageManager is REBOOTING SYSTEM ..."
elif $guiRestart ; then
if $shUninstall ; then
logMessage ">>>> restarting GUI"
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.0~28
v8.0~29

0 comments on commit c0613a5

Please sign in to comment.