<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>61242</bug_id>
          
          <creation_ts>2026-10-28 10:50:00 +0300</creation_ts>
          <short_desc>error() не импортирована в SRU::Response::Diagnostic</short_desc>
          <delta_ts>2026-10-29 21:24:06 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>perl-SRU</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Лавренко Егор Сергеевич">lavrenkoes</reporter>
          <assigned_to name="Vitaly Lipatov">lav</assigned_to>
          <cc>at</cc>
    
    <cc>cas</cc>
    
    <cc>crux</cc>
    
    <cc>ender</cc>
    
    <cc>lav</cc>
    
    <cc>ldv</cc>
    
    <cc>mike</cc>
    
    <cc>qa_viy</cc>
    
    <cc>shaba</cc>
    
    <cc>viy</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>303522</commentid>
    <comment_count>0</comment_count>
    <who name="Лавренко Егор Сергеевич">lavrenkoes</who>
    <bug_when>2026-10-28 10:50:00 +0300</bug_when>
    <thetext>Системы:
Alt Workstation 11.2 x86-64
Alt Workstation K 11.4 x86-64
Alt Education 11.2 XFCE x86-64 
Alt Education 11.2 KDE x86-64
Alt Server 11.1 x86-64 (Обновленная до Sisyphus)

Описание ошибки:
В SRU/Utils.pm определена функция error($msg) - она пишет сообщение в глобальную $SRU::Error и возвращает undef; это штатный способ сигнализировать об ошибке во всём пакете SRU (our @EXPORT_OK = qw( error )).

В SRU/Response/Term.pm и SRU/Response.pm она корректно импортирована (use SRU::Utils qw( error );). А в SRU/Response/Diagnostic.pm - нет: там только use SRU::Utils::XML qw( element elementNoEscape );, но при этом newFromCode() вызывает error(...):

sub newFromCode {
    my ($class,$code,$details) = @_;
    return error( &quot;no such diagnostic code ($code)&quot; )   # &lt;-- error() не импортирована
        if ! exists $DIAG{$code};
    ...
}

Шаги для воспроизведения:
1. Установить пакет:
   # apt-get install perl-SRU
2. Выполнить:
   $ perl -MSRU::Response::Diagnostic -e &apos;SRU::Response::Diagnostic-&gt;newFromCode(999)&apos;

Ожидаемое поведение:
При неизвестном коде newFromCode() возвращает undef и кладёт сообщение в $SRU::Error, ничего не печатая. 

Реальное поведение:
Undefined subroutine &amp;SRU::Response::Diagnostic::error called at /usr/share/perl5/SRU/Response/Diagnostic.pm line 117.

Дополнительно:
1. Воспроизводится в P11</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>303644</commentid>
    <comment_count>1</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2026-10-29 21:24:06 +0300</bug_when>
    <thetext>perl-SRU-1.01-alt2.1 -&gt; sisyphus:

Thu Oct 29 2026 Vitaly Lipatov &lt;lav@altlinux.ru&gt; 1.01-alt2.1
- NMU: fixed unknown diagnostic code handling (closes: #61242)
- added BuildRequires: perl-XML-LibXML (required to build the package).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>