Fix to use default package repository 'main'

When base OS image is from Ubunt/Debian, it does not have a package
manifest for 'ppa.linuxfactory.or.kr', there for ignore the previously
defined package manifest in the prebuilt OS image and use new one.

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I3cdc93945b94df14314a9d6f8d2ee94cd8157ea4
This commit is contained in:
Dongjin Kim
2022-04-09 13:16:54 +09:00
parent 25c288da39
commit 4f51aec913
3 changed files with 14 additions and 10 deletions

View File

@@ -1,7 +0,0 @@
#!/bin/sh
touch /etc/apt/sources.list.d/ppa-linuxfactory-or-kr.list
cat>>/etc/apt/sources.list.d/ppa-linuxfactory-or-kr.list<<__EOF
deb http://ppa.linuxfactory.or.kr @@DEFAULT_DISTRO@@ internal
__EOF

13
fixups/S00-repositories Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
if [ ! -f /etc/apt/sources.list.d/ppa-linuxfactory-or-kr.list ]; then
cat>/etc/apt/sources.list.d/ppa-linuxfactory-or-kr.list<<__EOF
deb [trusted=yes] http://ppa.linuxfactory.or.kr @@DEFAULT_DISTRO@@ main
__EOF
fi
if [ "x@@INTERNAL@@" = "xtrue" ]; then
cat>>/etc/apt/sources.list.d/ppa-linuxfactory-or-kr.list<<__EOF
deb [trusted=yes] http://ppa.linuxfactory.or.kr @@DEFAULT_DISTRO@@ internal
__EOF
fi

View File

@@ -400,12 +400,10 @@ do_preinstall() {
-e "s,@@DEFAULT_DISTRO@@,${DISTRO},g" \
-e "s,@@LIVESYSTEM@@,${LIVESYSTEM},g" \
-e "s,@@MACHINEID@@,$(dbus-uuidgen),g" \
-e "s,@@INTERNAL@@,${INTERNAL},g" \
${fixup}
done
[ "x${INTERNAL}" = "xtrue" ] \
|| rm -f ${rootfs_mnt}${fixups_dir}/S00-internal-repository
QEMU_BINARY=$(qemu_binary ${ARCH})
if [ ! "x${QEMU_BINARY}" = "x" ]; then