On Fri, 06 Jan 2023 01:56:33 -0700, Patrick Matthäi wrote: > Thanks for your investigation. I have tested it on my (sid/unstable) AMD > notebook and I can reproduce your issue with needrestart from stable. > But your patch does not produce another result for me. Are you sure, > that you didnt changed something else?
Color me confused. That file (in fact that one character) is all I changed. I tried it again and the patch seems to work for me. What I did was: apt-get install --reinstall needrestart needrestart -b # error message apply patch needrestart -b # no error here I'm attaching a full `script` of that attempt in case there's something significant in there that the above summary leaves out. That also has md5sum of AMD.pm before and after the patch in case that helps point to "what's different" between our two runs. If there's any more info I can supply, please let me know. Thanks for looking into this. Thanks, George
Script started on 2023-01-09 12:32:39-07:00 [TERM="xterm" TTY="/dev/pts/0" COLUMNS="80" LINES="24"] root@xecty# PS1='# ' # apt-get install --reinstall needrestart Reading package lists... 0% Reading package lists... 100% Reading package lists... Done Building dependency tree... 0% Building dependency tree... 0% Building dependency tree... 50% Building dependency tree... 50% Building dependency tree... Done Reading state information... 0% Reading state information... 0% Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 0 B/62.4 kB of archives. After this operation, 0 B of additional disk space will be used. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 59046 files and directories currently installed.) Preparing to unpack .../needrestart_3.5-4+deb11u2_all.deb ... Unpacking needrestart (3.5-4+deb11u2) over (3.5-4+deb11u2) ... Setting up needrestart (3.5-4+deb11u2) ... Processing triggers for man-db (2.9.4-2) ... NEEDRESTART-VER: 3.5 NEEDRESTART-KCUR: 5.10.0-20-amd64 NEEDRESTART-KEXP: 5.10.0-20-amd64 NEEDRESTART-KSTA: 1 NEEDRESTART-UCSTA: 1 NEEDRESTART-UCCUR: 0x03000027 Use of uninitialized value $ucode_vars{"AVAIL"} in concatenation (.) or string at /usr/sbin/needrestart line 904. NEEDRESTART-UCEXP: # # # needrestart -b NEEDRESTART-VER: 3.5 NEEDRESTART-KCUR: 5.10.0-20-amd64 NEEDRESTART-KEXP: 5.10.0-20-amd64 NEEDRESTART-KSTA: 1 NEEDRESTART-UCSTA: 1 NEEDRESTART-UCCUR: 0x03000027 Use of uninitialized value $ucode_vars{"AVAIL"} in concatenation (.) or string at /usr/sbin/needrestart line 904. NEEDRESTART-UCEXP: # cd /usr/share/perl5/NeedRestart/uCode/ # cat ~ghr/needrestart.patch --- /tmp/AMD.pm 2022-12-22 11:00:14.589106185 -0700 +++ /usr/share/perl5/NeedRestart/uCode/AMD.pm 2022-12-22 11:00:24.329046436 -0700 @@ -179,7 +179,7 @@ if ( exists( $_ucodes->{cpuid}->{$cpuid} ) ) { my $prid = $_ucodes->{cpuid}->{$cpuid}; if ( exists( $_ucodes->{prid}->{$prid} ) ) { - $vars{AVAIL} = sprintf( "0x%08x", $_ucodes->{prid}->{$prid} ), + $vars{AVAIL} = sprintf( "0x%08x", $_ucodes->{prid}->{$prid} ); print STDERR "$LOGPREF #$info->{processor} found ucode $vars{AVAIL}\n" if ($debug); if ( $_ucodes->{prid}->{$prid} > $ucode ) { # md5sum AMD.pm aa911d7cb8c97f464db89f0252ecaf73 AMD.pm # patch -p6 <~ghr/needrestart.patch patching file AMD.pm # md5sum AMD.pm 2be0d48086c482f6425e9626f73afbb9 AMD.pm # needrestart -b NEEDRESTART-VER: 3.5 NEEDRESTART-KCUR: 5.10.0-20-amd64 NEEDRESTART-KEXP: 5.10.0-20-amd64 NEEDRESTART-KSTA: 1 NEEDRESTART-UCSTA: 1 NEEDRESTART-UCCUR: 0x03000027 NEEDRESTART-UCEXP: 0x03000027 # exit Script done on 2023-01-09 12:33:54-07:00 [COMMAND_EXIT_CODE="0"]