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

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

    <bug>
          <bug_id>48771</bug_id>
          
          <creation_ts>2023-12-12 00:30:16 +0300</creation_ts>
          <short_desc>apt-repo set &lt;неправильное имя бранча&gt; удаляет все репозитории</short_desc>
          <delta_ts>2024-12-09 12:36: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>apt-repo</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="Aleksey Cheusov">vle</reporter>
          <assigned_to name="Andrey Cherepanov">cas</assigned_to>
          <cc>amakeenk</cc>
    
    <cc>cas</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>238823</commentid>
    <comment_count>0</comment_count>
    <who name="Aleksey Cheusov">vle</who>
    <bug_when>2023-12-12 00:30:16 +0300</bug_when>
    <thetext>Не смотря на то, что команде &quot;apt-repo set&quot; указан неправильный бранч, вообще все репозитории удяляются из конфигов apt. 

Type script ниже.

[root@ryzen ~]# apt-repo set p10; echo $?
0
[root@ryzen ~]# apt-repo list
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-i586 classic
rpm [p10] http://ftp.altlinux.org/pub/distributions/ALTLinux p10/branch/noarch classic
[root@ryzen ~]# apt-repo set p10.1; echo $?
Unknown branch name &apos;p10.1&apos;
1
[root@ryzen ~]# apt-repo list
[root@ryzen ~]#</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>238827</commentid>
    <comment_count>1</comment_count>
    <who name="Alexander Makeenkov">amakeenk</who>
    <bug_when>2023-12-12 09:31:39 +0300</bug_when>
    <thetext>Воспроизводится в сизифе.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>238849</commentid>
    <comment_count>2</comment_count>
    <who name="Aleksey Cheusov">vle</who>
    <bug_when>2023-12-12 12:31:01 +0300</bug_when>
    <thetext>Проблема усугубляется тем, что последующие 

apt-get update

и

apt-get dist-upgrade

ничего не делают совершенно молча как-будто все прекрасно,
что по-моему достойно отдельного PR.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>238851</commentid>
    <comment_count>3</comment_count>
    <who name="Alexander Makeenkov">amakeenk</who>
    <bug_when>2023-12-12 12:37:22 +0300</bug_when>
    <thetext>(Ответ для Aleksey Cheusov на комментарий #2)
&gt; Проблема усугубляется тем, что последующие 
&gt; 
&gt; apt-get update
&gt; 
&gt; и
&gt; 
&gt; apt-get dist-upgrade
&gt; 
&gt; ничего не делают совершенно молча как-будто все прекрасно,
&gt; что по-моему достойно отдельного PR.

Вы не правы, вывод того же apt-get update с пустым репозиторием и не пустым различается:

# apt-get update
Получено: 1 http://ftp.altlinux.org p10/branch/x86_64 release [4223B]
Получено: 2 http://ftp.altlinux.org p10/branch/x86_64-i586 release [1665B]
Получено: 3 http://ftp.altlinux.org p10/branch/noarch release [2844B]
Получено 8732B за 0s (313kB/s).
Получено: 1 http://ftp.altlinux.org p10/branch/x86_64/classic pkglist [23,8MB]
Получено: 2 http://ftp.altlinux.org p10/branch/x86_64/classic release [137B]
Получено: 3 http://ftp.altlinux.org p10/branch/x86_64-i586/classic pkglist [17,4MB]
Получено: 4 http://ftp.altlinux.org p10/branch/x86_64-i586/classic release [142B]
Получено: 5 http://ftp.altlinux.org p10/branch/noarch/classic pkglist [7153kB]
Получено: 6 http://ftp.altlinux.org p10/branch/noarch/classic release [137B]
Получено 48,4MB за 6s (7496kB/s).                                                                                                                                                                                                                                             
Чтение списков пакетов... Завершено
Построение дерева зависимостей... Завершено

против:
# apt-get update
Чтение списков пакетов... Завершено
Построение дерева зависимостей... Завершено</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>238892</commentid>
    <comment_count>4</comment_count>
    <who name="Aleksey Cheusov">vle</who>
    <bug_when>2023-12-12 19:23:01 +0300</bug_when>
    <thetext>Exit status 0 при пустом репозитории -- это на мой взглядненормально. Так или иначе этот тикет о другом.

[root@ryzen ~]# apt-repo set bred
Unknown branch name &apos;bred&apos;
[root@ryzen ~]# apt-get update; echo $?
Reading Package Lists... Done
Building Dependency Tree... Done
0
[root@ryzen ~]# apt-get dist-upgrade; echo $?
Reading Package Lists... Done
Building Dependency Tree... Done
Calculating Upgrade... Done
0 upgraded, 0 newly installed, 0 removed and 0 not upgraded.
0
[root@ryzen ~]#</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>255696</commentid>
    <comment_count>5</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2024-12-09 12:36:06 +0300</bug_when>
    <thetext>apt-repo-1.4.6-alt1 -&gt; sisyphus:

 Mon Dec 09 2024 Andrey Cherepanov &lt;cas@altlinux&gt; 1.4.6-alt1
 - Add gostcrypto component to branch if it was used (ALT #51886, #48419).
 - Check for existing branch in apt-repo set (ALT #48771)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>