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

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

    <bug>
          <bug_id>48432</bug_id>
          
          <creation_ts>2023-11-14 07:17:45 +0300</creation_ts>
          <short_desc>Не загружаются образы операционных систем, для cоздания загрузочной флешки.</short_desc>
          <delta_ts>2024-03-20 15:58:48 +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>impression</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</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="Олег Щавелев">oleg</reporter>
          <assigned_to name="Yuri N. Sedunov">aris</assigned_to>
          <cc>aris</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>237007</commentid>
    <comment_count>0</comment_count>
    <who name="Олег Щавелев">oleg</who>
    <bug_when>2023-11-14 07:17:45 +0300</bug_when>
    <thetext>Стенды с ошибкой:
=================
* ALT Regular Sisyphus x86_64
* Kernel: 6.5.11-un-def-alt1 
* GNOME 45.0 
* AMD Ryzen 7 4800HS with Radeon Graphics (16) @ 4.300GHz 
* AMD ATI 04:00.0 Renoir 
* 1: 1920x1080~144Hz 2: 1280x720~60Hz
* Wayland

Версия программы:
=================
impression-3.0.1-alt1.x86_64

Шаги, приводящие к ошибке:
=================
Открыть impression

Результат:
==========
Отсутствует список дистубутивов. Вечная загрузка.

[oleg@alt-gnome ~]$ impression
thread &apos;&lt;unnamed&gt;&apos; panicked at src/online.rs:37:71:
called `Result::unwrap()` on an `Err` value: NotPresent
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Ожидаемый результат:
====================
Список дистубутивов загружается.

Дополнительно:
====================
https://disk.yandex.ru/d/7J6ITgwmzqaQIw</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>237015</commentid>
    <comment_count>1</comment_count>
    <who name="Yuri N. Sedunov">aris</who>
    <bug_when>2023-11-14 09:13:48 +0300</bug_when>
    <thetext>Видно, что
1) лезем сразу в сеть за последней osinfo-db, хотя у нас есть своя.

src/online.rs:

34     let latest_file_stem = latest_file[..(latest_file.len() - &quot;.tar.xz&quot;.len())].to_string();
     35     let latest_url = format!(&quot;https://releases.pagure.org/libosinfo/{}&quot;, latest_file);
     36 

2) Пытаемся распаковать базу в $XDG_CACHE_HOME/tmp, но переменная XDG_CACHE_HOME не установлена, и на этом обламываемся.

Хотя по спецификации:
&quot;$XDG_CACHE_HOME defines the base directory relative to which user-specific non-essential data files should be stored. If $XDG_CACHE_HOME is either not set or empty, a default equal to $HOME/.cache should be used.&quot;
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3) Если создать $HOME/.cache/tmp (поскольку сам он её не создает) и запустить impression так:

$ XDG_CACHE_HOME=$HOME/.cache/ impression

увидим вожделенный список, но ...


     37     let temp_dir = format!(&quot;{}/tmp/&quot;, std::env::var(&quot;XDG_CACHE_HOME&quot;).unwrap());
     38     let result_file = format!(&quot;{}db.tar.xz&quot;, temp_dir);
     39     let result_directory = format!(&quot;{}{}/os/&quot;, temp_dir, latest_file_stem);

4) он будет сильно урезанный потому, что не все дистрибутивы по мнению автора одинаково хороши, скорее хороших очень мало.

     40     let good_distros = [
     41         (&quot;archlinux.org&quot;, &quot;Arch Linux&quot;),
     42         (&quot;endlessos.com&quot;, &quot;Endless OS&quot;),
     43         (&quot;fedoraproject.org&quot;, &quot;Fedora&quot;),
     44         (&quot;manjaro.org&quot;, &quot;Manjaro&quot;),
     45         (&quot;opensuse.org&quot;, &quot;OpenSUSE&quot;),
     46         (&quot;ubuntu.com&quot;, &quot;Ubuntu&quot;),
     47     ];

Обо всем этом вы можете повесить багу в апстрим.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>243268</commentid>
    <comment_count>2</comment_count>
    <who name="Yuri N. Sedunov">aris</who>
    <bug_when>2024-03-20 15:58:48 +0300</bug_when>
    <thetext>Давно исправлено.
Кто-то хвалился позакрывать наши с Антоном старые баги, но даже за своими не следит.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>