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

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

    <bug>
          <bug_id>43874</bug_id>
          
          <creation_ts>2022-09-26 19:21:34 +0300</creation_ts>
          <short_desc>Некорректная работа команды apt-repo при добавлении адреса репозитория.</short_desc>
          <delta_ts>2025-02-05 17:27:54 +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>apt-repo</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></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="Savelev Pavel">savelevpa</reporter>
          <assigned_to name="Andrey Cherepanov">cas</assigned_to>
          <cc>antohami</cc>
    
    <cc>cas</cc>
    
    <cc>monastirskiyii</cc>
    
    <cc>rider</cc>
    
    <cc>vercha</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>215314</commentid>
    <comment_count>0</comment_count>
    <who name="Savelev Pavel">savelevpa</who>
    <bug_when>2022-09-26 19:21:34 +0300</bug_when>
    <thetext>Версия пакета: apt-repo-1.4.0-alt1.noarch

Воспроизведение ошибки было проверено на alt-workstation-10-x86-64 и alt-server-10-x86-64

Шаги для воспроизведения:

1. Выполнить команду

# apt-repo add rpm [p10] http://ftp.altlinux.org/pub/distributions/ALTLinux/ p10/branch/x86_64 gostcrypto

2. Обновить базу данный пакетов в репозиториях:

# apt-get update

Появляется ошибка:

# apt-get update 
Получено: 1 http://ftp.altlinux.org distributions/ALTLinux/p10/branch/x86_64 release [4223B]
Получено: 2 http://ftp.altlinux.org p10/branch/x86_64 release [4223B]
Получено: 3 http://ftp.altlinux.org p10/branch/x86_64-i586 release [1665B]
Получено: 4 http://ftp.altlinux.org p10/branch/noarch release [2844B]
Ошибка http://ftp.altlinux.org p10/branch/x86_64 release
  could not open gpg signed file /var/lib/apt/lists/partial/ftp.altlinux.org_pub_distributions_ALTLinux_p10_branch_x86%5f64_base_release - open (2 No such file or directory)
Получено 8733B за 0s (44,5kB/s).
W: Release files for some repositories could not be retrieved or authenticated. Such repositories are being ignored.
E: Failed to fetch http://ftp.altlinux.org/pub/distributions/ALTLinux/p10/branch/x86_64/base/release  could not open gpg signed file /var/lib/apt/lists/partial/ftp.altlinux.org_pub_distributions_ALTLinux_p10_branch_x86%5f64_base_release - open (2 No such file or directory)
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: Tried to dequeue a fetching object
E: Tried to dequeue a fetching object
E: Tried to dequeue a fetching object
E: Tried to dequeue a fetching object
....

При выполнении команды apt-repo add *** в файл /etc/apt/sources.list добавляется строка с ошибками синтаксиса:

rpm [p10] http://ftp.altlinux.org/pub distributions/ALTLinux/p10/branch/x86_64 gostcrypto

должно быть

rpm [p10] http://ftp.altlinux.org/pub/distributions/ALTLinux/ p10/branch/x86_64 gostcrypto

Однако, если добавить тот же репозиторий, но с Яндекса, то всё работает корректно.

# apt-repo add rpm [p10] http://mirror.yandex.ru/altlinux/ p10/branch/x86_64 gostcrypto

# apt-repo
rpm [p10] http://mirror.yandex.ru/altlinux/ p10/branch/x86_64 gostcrypto</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>215326</commentid>
    <comment_count>1</comment_count>
    <who name="Andrey Cherepanov">cas</who>
    <bug_when>2022-09-27 07:28:26 +0300</bug_when>
    <thetext>Добавлять нужно одним параметром, заключенным в кавычки.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>215327</commentid>
    <comment_count>2</comment_count>
    <who name="Антон Мидюков">antohami</who>
    <bug_when>2022-09-27 08:11:01 +0300</bug_when>
    <thetext>(Ответ для Andrey Cherepanov на комментарий #1)
&gt; Добавлять нужно одним параметром, заключенным в кавычки.

Необходимость кавычек зависит от эмулятора терминала. В mate-terminal и так работает (проверил и удивился). Проблема описана другая.
Это похоже на проблему apt. Если присутствует две записи с указанием на разные компоненты, то такая ошибка и происходит.
В данном случае:
rpm [p10] http://ftp.altlinux.org/pub/distributions/ALTLinux/ p10/branch/x86_64 gostcrypto
rpm [p10] http://ftp.altlinux.org/pub/distributions/ALTLinux/ p10/branch/x86_64 classic

Правильно указывать компоненты одного репозитория в одной записи:
rpm [p10] http://ftp.altlinux.org/pub/distributions/ALTLinux/ p10/branch/x86_64 classic gostcrypto

Но интересно, что после таких манипуляций репозитории насовсем ломаются, пока не удалишь /var/lib/apt/lists/partial/*. Там эти файлы пустые почему-то. Собственно, проблема в этом и состоит, что пустые файлы ломают подключение источника насовсем. Предлагаю на apt в Сизифе всё же багу повесить. Пользователи могут такое сотворить запросто.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>215333</commentid>
    <comment_count>3</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2022-09-27 09:48:56 +0300</bug_when>
    <thetext>на исправление apt надежды нет, было бы неплохо добавить проверку прямо в apt-repo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>245633</commentid>
    <comment_count>4</comment_count>
    <who name="Монастырский Илья">monastirskiyii</who>
    <bug_when>2024-04-29 12:59:21 +0300</bug_when>
    <thetext>Ошибка актуальна для образа: 
alt-workstation-10.2-x86_64.iso</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>258673</commentid>
    <comment_count>5</comment_count>
    <who name="Vera Blagoveschenskaya">vercha</who>
    <bug_when>2025-02-05 17:27:54 +0300</bug_when>
    <thetext>Ошибка актуальна для версии 
apt-repo-1.4.4-alt1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>