Skip to content

Commit

Permalink
feat: 不同架构区分预装列表
Browse files Browse the repository at this point in the history
  • Loading branch information
lichenggang committed Nov 26, 2024
1 parent d74285c commit 0248347
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 15 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
deepin-desktop-environment (2024.11.26) unstable; urgency=medium

* add packages.linglong.$arch

-- lichenggang <[email protected]> Tue, 26 Nov 2024 15:47:45 +0800

deepin-desktop-environment (2024.11.25) unstable; urgency=medium

* update package linglong.
Expand Down
2 changes: 1 addition & 1 deletion debian/deepin-desktop-environment-ll.install
Original file line number Diff line number Diff line change
@@ -1 +1 @@
packages.linglong /etc/
packages.linglong.${DEB_HOST_MULTIARCH} /etc/
47 changes: 33 additions & 14 deletions debian/deepin-desktop-environment-ll.postinst
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
#!/bin/bash
set -x

LL_pkgList=/etc/packages.linglong
LL_pkgList_amd64=/etc/packages.linglong.amd64
LL_pkgList_arm64=/etc/packages.linglong.arm64

# 获取系统架构
arch=$(dpkg --print-architecture)

install_pkg(){
if [ ! -f $1 ]
then
echo "Error: $1 Not Found."
exit 0

if [ ! -f $1 ]
then
echo "Error: $1 Not Found."
exit 0
fi

for pkg in `cat $1 | grep -v "^#"`
do
ll-cli --no-dbus install ${pkg}
if [ $? -ne 0 ]; then
echo "Command failed. Exiting."
exit 1
fi
done

for pkg in `cat $1 | grep -v "^#"`
do
ll-cli --no-dbus install ${pkg}
if [ $? -ne 0 ]; then
echo "Command failed. Exiting."
exit 1
fi
done
}






update_ll_repo-dev(){
cat > /usr/share/linglong/config.yaml<< EOF
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
Expand Down Expand Up @@ -64,7 +71,19 @@ if [ "$1" = "configure" ] && [ "$2" = "" ]; then
/usr/libexec/linglong/create-linglong-dirs
fi
update_ll_repo-dev
install_pkg ${LL_pkgList}

case "$arch" in
amd64)
install_pkg ${LL_pkgList_amd64}
;;
arm64)
install_pkg ${LL_pkgList_arm64}
;;
*)
echo "Unknown architecture: $arch"
;;
esac

update_ll_repo

fi
Expand Down
File renamed without changes.
20 changes: 20 additions & 0 deletions packages.linglong.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
org.dde.calendar
org.deepin.introduction
org.deepin.calculator
org.deepin.draw
org.deepin.editor
org.deepin.movie
org.deepin.reader
#org.deepin.manual
#org.deepin.browser
org.deepin.mail
org.deepin.camera
org.deepin.fontmanager
#org.deepin.gomoku
#org.deepin.lianliankan
#org.deepin.screen-recorder
#org.deepin.voice.note
#org.deepin.image.viewer
#org.deepin.album
#org.deepin.compressor
#org.deepin.music

0 comments on commit 0248347

Please sign in to comment.