add support for shared profile use

Our profiles have a lot of duplicated packages in their profiles.
So add support for a shared profile, that has all the packages that
needs to be installed on all profiles, so we can clean up the profiles
in the future.

See
https://gitlab.manjaro.org/manjaro-arm/applications/manjaro-arm-tools/-/merge_requests/15
for the Manjaro ARM Tools MR for the same thing.

Signed-off-by: Dan Johansen <strit@manjaro.org>
This commit is contained in:
Dan Johansen 2023-01-14 20:23:59 +01:00
parent 105e342f20
commit 40543f9fcf
No known key found for this signature in database
GPG Key ID: 084A7FC0035B1D49
1 changed files with 2 additions and 1 deletions

View File

@ -148,7 +148,7 @@ create_install() {
mkdir -p $TMPDIR/pkg-cache
mount -o bind $TMPDIR/pkg-cache $TMPDIR/root/var/cache/pacman/pkg
# Install device and editions specific packages
$NSPAWN $TMPDIR/root pacman -Syyu base manjaro-system manjaro-release systemd systemd-libs $PKG_EDITION $PKG_DEVICE --noconfirm
$NSPAWN $TMPDIR/root pacman -Syyu base manjaro-system manjaro-release systemd systemd-libs $PKG_SHARED $PKG_EDITION $PKG_DEVICE --noconfirm
info "Enabling services..."
@ -1066,6 +1066,7 @@ installer_getarmprofiles
sed -i 's/pico-wizard-plamo-scripts//g' $TMPDIR/arm-profiles/editions/$EDITION
sed -i 's/pico-wizard-git//g' $TMPDIR/arm-profiles/editions/$EDITION
PKG_DEVICE=$(grep "^[^#;]" $TMPDIR/arm-profiles/devices/$DEVICE | awk '{print $1}')
PKG_SHARED=$(grep "^[^#;]" $TMPDIR/arm-profiles/editions/shared | awk '{sub(/>pinephone/,""); print $1}')
case "$DEVICE" in
pinephone)
PKG_EDITION=$(grep "^[^#;]" $TMPDIR/arm-profiles/editions/$EDITION | awk '{sub(/>pinephone/,""); print $1}')