Bug 26995 - ERROR: 'script' failed for microcode -0.2020616-1.mga8.nonfree-noarch
Summary: ERROR: 'script' failed for microcode -0.2020616-1.mga8.nonfree-noarch
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: All Packagers
QA Contact:
URL:
Whiteboard:
Keywords: 8beta1
Depends on:
Blocks:
 
Reported: 2020-07-24 08:26 CEST by Ben McMonagle
Modified: 2021-01-21 06:59 CET (History)
4 users (show)

See Also:
Source RPM: microcode-0.2020616-1.mga8.nonfree-noarch
CVE:
Status comment:


Attachments
report.bug.xz from install (183.17 KB, application/x-xz)
2020-07-24 08:28 CEST, Ben McMonagle
Details
lspcidrake (2.95 KB, text/plain)
2020-07-24 08:30 CEST, Ben McMonagle
Details

Description Ben McMonagle 2020-07-24 08:26:06 CEST
Description of problem: at the completion   of the install if Xfce from Mga8-beta1-i586. Classic Install .iso, the following error is displayed after updates are applied:

an error occurred:
ERROR: 'script' failed for microcode-0.2020616-1.mga8.nonfree-noarch.


Version-Release number of selected component (if applicable):
ISO Name: Mageia-8-beta1-i586.iso
DATE.txt: Sun 19 Jul 2020 12:59:01 PM CEST
md5sum:   ec65777bc934f0e078e8b9c468a01bdb


How reproducible: on different hardware, real 32bit processor(AMD 2400XP) and intel Core i5 (Toshiba portege R930


Steps to Reproduce:
1.install Xfce from i586 Classic Install .iso
2.at configure page, configure network (wired)
3.after bootloader installation, choose to update system
Ben McMonagle 2020-07-24 08:27:42 CEST

Keywords: (none) => 8beta1

Comment 1 Ben McMonagle 2020-07-24 08:28:27 CEST
Created attachment 11759 [details]
report.bug.xz from install
Comment 2 Ben McMonagle 2020-07-24 08:30:09 CEST
Created attachment 11760 [details]
lspcidrake
Ben McMonagle 2020-07-24 08:32:15 CEST

Summary: ERROR: 'script' failed for microcode => ERROR: 'script' failed for microcode -0.2020616-1.mga8.nonfree-noarch

Comment 3 Dave Hodgins 2020-07-24 08:48:34 CEST
As the package installs cleanly if installed after rebooting into the installed
system, I suspect "DURING_INSTALL" is not being set by the installer anymore.

$ rpm -q --scripts microcode shows
postinstall scriptlet (using /bin/sh):
if [ -z "$DURING_INSTALL" ] ; then
     /usr/bin/dracut -f
fi

CC: (none) => davidwhodgins
Assignee: bugsquad => mageia

Dave Hodgins 2020-07-24 09:02:41 CEST

Component: RPM Packages => Installer

Comment 4 Martin Whitaker 2020-07-24 11:34:19 CEST
$DURING_INSTALL is only set in the package install step, not in the package update step. And this is correct - the update step occurs after the system has been configured and the initial RAM disk has been created. If we set $DURING_INSTALL during the update step, then the initial RAM disk wouldn't get updated.

I think this needs to be fixed in the microcode package postinstall scriptlet.

Component: Installer => RPM Packages
Assignee: mageia => pkg-bugs

Comment 5 Martin Whitaker 2020-07-24 18:57:29 CEST
Something like this should work:

if [ -z "$DURING_INSTALL" ] ; then
  kernel=$(uname -r)
  if [ -d /usr/lib/modules/$kernel ] ; then
    # rebuild initrd for currently running kernel
    /usr/bin/dracut -f
  else
    # rebuild initrd for most recently installed kernel
    kernel=$(ls -1t /usr/lib/modules | head -1)
    /usr/bin/dracut -f /boot/initrd-$kernel.img $kernel
  fi
fi

CC: (none) => mageia

David Walser 2020-07-24 19:51:37 CEST

CC: (none) => nicolas.salguero

Comment 6 Nicolas Salguero 2020-07-25 11:41:24 CEST
Hi,

microcode-0.2020616-2.mga8.nonfree contains the modification of the post script which was proposed in comment 5.

Best regards,

Nico.
Comment 7 Morgan Leijström 2021-01-21 00:39:58 CET
Status?

CC: (none) => fri

Comment 8 Ben McMonagle 2021-01-21 06:59:45 CET
resolved

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.