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

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

    <bug>
          <bug_id>45753</bug_id>
          
          <creation_ts>2023-04-05 14:15:48 +0300</creation_ts>
          <short_desc>bash-completion предлагает варианты установки пакетов, которых уже нет в репозитории</short_desc>
          <delta_ts>2026-02-23 11:00:16 +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</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>ASSIGNED</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="Vera Blagoveschenskaya">vercha</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>antohami</cc>
    
    <cc>boyarsh</cc>
    
    <cc>glebfm</cc>
    
    <cc>ildar</cc>
    
    <cc>imz</cc>
    
    <cc>ldv</cc>
    
    <cc>placeholder</cc>
    
    <cc>rider</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>223960</commentid>
    <comment_count>0</comment_count>
    <who name="Vera Blagoveschenskaya">vercha</who>
    <bug_when>2023-04-05 14:15:48 +0300</bug_when>
    <thetext>Тестовый стенд
Workstation 10.1, обновленный до sisyphus

bash-completion-2.11-alt3.git.157.g59d2322e

# apt-get install bacula (нажать tab)

Результат: выводится список вариантов

bacula11                      bacula11-director-mysql       bacula7-common                bacula9                       bacula9-director-sqlite3      bacula-director-common
bacula11-bat                  bacula11-director-postgresql  bacula7-console               bacula9-bat                   bacula9-nagios                bacula-director-mysql
bacula11-client               bacula11-director-sqlite3     bacula7-debug                 bacula9-client                bacula9-storage               bacula-director-postgresql
bacula11-common               bacula11-fd                   bacula7-director-common       bacula9-common                bacula9-traymonitor           bacula-director-sqlite3
bacula11-console              bacula11-nagios               bacula7-director-mysql        bacula9-console               bacula-bat                    bacula-mls-backup
bacula11-debug                bacula11-storage              bacula7-director-postgresql   bacula9-debug                 bacula-client                 bacula-nagios
bacula11-dir                  bacula11-traymonitor          bacula7-director-sqlite3      bacula9-director-common       bacula-common                 bacula-storage
bacula11-director             bacula7-bat                   bacula7-nagios                bacula9-director-mysql        bacula-console                
bacula11-director-common      bacula7-client                bacula7-storage               bacula9-director-postgresql   bacula-debug   

При этом в репозитории осталась только версия bacula11*

Ожидаемый результат: нужно отсеивать выбывшие из репозитория пакеты</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223995</commentid>
    <comment_count>1</comment_count>
    <who name="ildar">ildar</who>
    <bug_when>2023-04-05 18:07:00 +0300</bug_when>
    <thetext>Но, по всей видимости, где-то эти пакеты у Вас apt-ах есть.
Для проверки:
&gt; apt-cache show bacula7-client

apt ищет во всех своих sources + в установленных пакетах.
Это поведение, боюсь, исправить будет нереально.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223996</commentid>
    <comment_count>2</comment_count>
    <who name="Антон Мидюков">antohami</who>
    <bug_when>2023-04-05 18:09:27 +0300</bug_when>
    <thetext>(Ответ для ildar на комментарий #1)
&gt; Но, по всей видимости, где-то эти пакеты у Вас apt-ах есть.

В Conflicts у bacula11-*</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223999</commentid>
    <comment_count>3</comment_count>
    <who name="ildar">ildar</who>
    <bug_when>2023-04-05 18:14:01 +0300</bug_when>
    <thetext>ооо! это меняет дело!
хмм, Антон, есть идеи, как это поправить?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>224013</commentid>
    <comment_count>4</comment_count>
    <who name="Vitaly Chikunov">vt</who>
    <bug_when>2023-04-05 19:57:42 +0300</bug_when>
    <thetext>(In reply to ildar from comment #3)
&gt; ооо! это меняет дело!
&gt; хмм, Антон, есть идеи, как это поправить?

Добавить --no-all-versions в /usr/share/bash-completion/completions/apt-cache в _apt_cache_packages в `apt-cache --no-generate pkgnames`</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>224633</commentid>
    <comment_count>5</comment_count>
    <who name="Антон Мидюков">antohami</who>
    <bug_when>2023-04-18 03:51:01 +0300</bug_when>
    <thetext>(Ответ для ildar на комментарий #3)
&gt; ооо! это меняет дело!
&gt; хмм, Антон, есть идеи, как это поправить?

Виталий предложил исправление:

(Ответ для Vitaly Chikunov на комментарий #4)
&gt; (In reply to ildar from comment #3)
&gt; &gt; ооо! это меняет дело!
&gt; &gt; хмм, Антон, есть идеи, как это поправить?
&gt; 
&gt; Добавить --no-all-versions в
&gt; /usr/share/bash-completion/completions/apt-cache в _apt_cache_packages в
&gt; `apt-cache --no-generate pkgnames`

ildar, будете исправлять?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>224635</commentid>
    <comment_count>6</comment_count>
    <who name="ildar">ildar</who>
    <bug_when>2023-04-18 08:45:09 +0300</bug_when>
    <thetext>боюсь, сейчас сделать и протестировать — никак, аврал. Недели через две.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>282440</commentid>
    <comment_count>7</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2026-02-21 20:20:19 +0300</bug_when>
    <thetext>$ apt-cache --no-generate --no-all-versions pkgnames|grep php8.0
i586-php8.0-xhprof
php8.0-pdo-devel
i586-apache2-mod_php8.0
php8.0-xhprof
apache2-mod_php8.0

но эти пакеты уже давно удалены из репозитория. Оно похоже конфликты находит. Тут только apt чинить.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>282451</commentid>
    <comment_count>8</comment_count>
    <who name="Vitaly Chikunov">vt</who>
    <bug_when>2026-02-22 00:40:06 +0300</bug_when>
    <thetext>(In reply to Anton Farygin from comment #7)
&gt; $ apt-cache --no-generate --no-all-versions pkgnames|grep php8.0
&gt; i586-php8.0-xhprof
&gt; php8.0-pdo-devel
&gt; i586-apache2-mod_php8.0
&gt; php8.0-xhprof
&gt; apache2-mod_php8.0
&gt; 
&gt; но эти пакеты уже давно удалены из репозитория. Оно похоже конфликты
&gt; находит. Тут только apt чинить.

 $ apt-cache pkgnames --no-all-names | grep php8.0 | wc -l
 0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>282462</commentid>
    <comment_count>9</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2026-02-22 11:07:25 +0300</bug_when>
    <thetext>Но тогда не будет работать поиск по виртуальным пакетам - Provides.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>282471</commentid>
    <comment_count>10</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2026-02-23 11:00:16 +0300</bug_when>
    <thetext>Думаю что текущее поведение с учётом возможностей apt - оптимально.
Конечно, надо исправить, но всё-таки исправлять надо в apt, добавив в него нужный инструмент для получения списка Provides в пакетах.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>