[Repository/Mirror] 请UengineApp打包的deb修改postscript习惯。
Tofloor
poster avatar
friddle
deepin
2021-07-05 20:33
Author

这是一个典型的UengineApp打包的deb删除脚本。

 

 

 

#!/bin/sh

APP_NAME="com.ximalaya.ting.android"

session_manager=`ps -ef | grep "uengine session-manager" | grep -v grep`
if test -z "$session_manager"; then
    echo "ERROR: app install failed(session-manager not start)."
    exit 1
fi

echo "Uninstalling $APP_NAME"
ret=`/usr/bin/uengine-session-launch-helper -- uengine uninstall --pkg="$APP_NAME"`
if [ $? -ne 0 ]; then
    echo "ERROR: app uninstall error..."
    exit 1
fi
chkfail=`echo $ret |grep "Failed"`
if test -n "$chkfail" ; then
    echo "ERROR: $ret"
    exit 1
fi

cat /etc/passwd | awk -F: '$3>=1000' | cut -f 1 -d : | while read line
do
    inifile="/home/$line/.config/uengineAppGeometry.ini"
    if [ -f $inifile ]; then
        sed -i "/$APP_NAME/d" $inifile
    fi
done

exit 0

假如AppContainer没有成功安装或者启动的话。

你这里各种exit 1

这样搞大概率触发装不上也删不了关键问题。非常影响用户体验。直接破坏依赖链。

一般来说安装就是安装。启动不了是启动不了。这是两回事。别搞在一起。

 

 

对于出现这种问题的。

先sudo dpkg --configure -a

 比如uengine.com.ximalaya.ting.android 修改 uengine.com.ximalaya.ting.android.prerm/uengine.com.ximalaya.ting.android.postinst 两个文件。把exit 1全部改成exit 0

 

到相应目录下/var/lib/dpkg/info修改相应脚本 。

 

 

 

Reply Favorite View the author
All Replies
friddle
deepin
2021-07-05 20:41
#1

https://bbs.deepin.org/en/post/205948

还有这个问题最新版的还没解决

Reply View the author
ucSec
deepin
2021-07-09 00:57
#2

支持!

Reply View the author
friddle
deepin
2021-07-13 17:45
#3
ucSec

支持!

不知道哪里从代码反馈

Reply View the author