diff options
-rwxr-xr-x | create_arm_image.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/create_arm_image.sh b/create_arm_image.sh index 0e037f8..01855e6 100755 --- a/create_arm_image.sh +++ b/create_arm_image.sh @@ -205,12 +205,20 @@ function addurpmimedia() /sbin/urpmi.removemedia --urpmi-root "${BUILD_PATH}" -a info "Adding media" + if [ -e "${CONFIG_PATH}/media.pm.patch" ]; then + warning "A patch for media.pm found, patching host system script /usr/share/perl5/vendor_perl/urpm/media.pm ..." + patch -i "${CONFIG_PATH}/media.pm.patch" /usr/share/perl5/vendor_perl/urpm/media.pm + fi if [ ! -z "${MIRROR}" ] ; then /sbin/urpmi.addmedia --urpmi-root "${BUILD_PATH}" --distrib "${MIRROR}" else info "MIRROR variable not set, using mirrorlist." /sbin/urpmi.addmedia --urpmi-root "${BUILD_PATH}" --distrib --mirrorlist "http://mirrors.mageia.org/api/mageia.${MAGEIA_VERSION}.${ARM_VERSION}.list" fi + if [ -e "${CONFIG_PATH}/media.pm.patch" ]; then + warning "Reverting patch on host system script..." + patch -R -i "${CONFIG_PATH}/media.pm.patch" /usr/share/perl5/vendor_perl/urpm/media.pm + fi err=${?} if [ ${err} -ne 0 ]; then |