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

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

    <bug>
          <bug_id>31577</bug_id>
          
          <creation_ts>2015-12-01 18:27:32 +0300</creation_ts>
          <short_desc>1.2.0-alt1 добавляет несуществующий репозитарий &quot;x86_64-i586 task&quot;</short_desc>
          <delta_ts>2016-05-09 20:46:36 +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>all</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>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>29690</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="Andrey Cherepanov">cas</assigned_to>
          <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>154072</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2015-12-01 18:27:32 +0300</bug_when>
    <thetext>У меня такая же проблема с добавлением несуществующего x86_64-i586 для task-репозиториев для Sisyphus, например, http://git.altlinux.org/tasks/153832 .

Это вплоть до apt-repo-1.2.3-alt1.

В отличие от работы с системным APT, это сильно мешает при использовании hasher при запуске:

apt-repo --hsh-apt-config=/home/imz/.hasher/apt.conf test 153832

В apt-repo-1.2.2-alt1, чтобы это обойти, добавил возможность запустить с NO_TASK_AREPO_HACK=yes.

В apt-repo-1.2.3-alt1 добавил подсказку на эту тему. И облом, если на этапе update произошли проблемы.

+++ This bug was initially created as a clone of Bug #29690 +++

# apt-repo add 111476
# apt-repo
rpm http://git.altlinux.org/repo/111476/ x86_64 task
rpm http://git.altlinux.org/repo/111476/ x86_64-i586 task
&lt;...&gt;

Хотя, возможно, что правильнее сделать так, чтобы репозитарий x86_64-i586 и для t6/p6 создавался (задание 111476 для t6 правда).

И, наверное, паровозом, для p5/5.1 это же проверить...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156307</commentid>
    <comment_count>1</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2016-04-26 19:44:22 +0300</bug_when>
    <thetext>apt-repo-1.3.0-alt1 -&gt; sisyphus:

* Mon Apr 25 2016 Andrey Cherepanov &lt;cas@altlinux&gt; 1.3.0-alt1
- Add p8 branch (ALT #32006)
- Add support for altlinuxclub sources
- Add arepo repo for task only if it exists (ALT #31577)
- Use new format of source (ALT #31974)
- Optional package name(s) support in apt-repo test
- Remove duplicate package names in task list
- Do not use strict extension for compessed man page</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156646</commentid>
    <comment_count>2</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2016-05-09 18:30:11 +0300</bug_when>
    <thetext>Попробовал, но эта проверка не даёт желаемого результата -- там пустой файл:

[root@ovicaa ~]# rpm -q apt-repo
apt-repo-1.3.3-alt1
[root@ovicaa ~]# apt-repo
rpm [updates] http://ftp.altlinux.org/pub/distributions/ALTLinux t7/branch/x86_64 classic
rpm [updates] http://ftp.altlinux.org/pub/distributions/ALTLinux t7/branch/noarch classic
rpm [updates] http://ftp.altlinux.org/pub/distributions/ALTLinux t7/branch/x86_64-i586 classic
[root@ovicaa ~]# apt-repo add 164430
[root@ovicaa ~]# apt-repo
rpm [updates] http://ftp.altlinux.org/pub/distributions/ALTLinux t7/branch/x86_64 classic
rpm [updates] http://ftp.altlinux.org/pub/distributions/ALTLinux t7/branch/noarch classic
rpm [updates] http://ftp.altlinux.org/pub/distributions/ALTLinux t7/branch/x86_64-i586 classic
rpm http://git.altlinux.org repo/164430/x86_64 task
rpm http://git.altlinux.org repo/164430/x86_64-i586 task
[root@ovicaa ~]# curl -s -o /dev/null -w &apos;%{http_code}&apos; http://git.altlinux.org/tasks/164430/plan/arepo-add-x86_64-i586
200[root@ovicaa ~curl http://git.altlinux.org/tasks/164430/plan/arepo-add-x86_64-i586; echo $?
0
[root@ovicaa ~]# apt-get update
Get:1 http://ftp.altlinux.org t7/branch/x86_64 release [896B]
Get:2 http://ftp.altlinux.org t7/branch/noarch release [757B]
Get:3 http://ftp.altlinux.org t7/branch/x86_64-i586 release [555B]
Get:4 http://git.altlinux.org repo/164430/x86_64 release [556B]
Ign http://git.altlinux.org repo/164430/x86_64-i586 release
Fetched 2764B in 0s (16,2kB/s)
Hit http://git.altlinux.org repo/164430/x86_64/task pkglist
Hit http://ftp.altlinux.org t7/branch/x86_64/classic pkglist
Hit http://git.altlinux.org repo/164430/x86_64/task release
Err http://git.altlinux.org repo/164430/x86_64-i586/task pkglist
  404 Not Found
Ign http://git.altlinux.org repo/164430/x86_64-i586/task release
Hit http://ftp.altlinux.org t7/branch/x86_64/classic release
Hit http://ftp.altlinux.org t7/branch/noarch/classic pkglist
Hit http://ftp.altlinux.org t7/branch/noarch/classic release
Hit http://ftp.altlinux.org t7/branch/x86_64-i586/classic pkglist
Hit http://ftp.altlinux.org t7/branch/x86_64-i586/classic release
Failed to fetch http://git.altlinux.org/repo/164430/x86_64-i586/base/pkglist.task  404 Not Found
Reading Package Lists... Done
Building Dependency Tree... Done
E: Some index files failed to download, they have been ignored, or old ones used instead.
[root@ovicaa ~]# 

А apt скачать не может, ошибка.

Действительно, пустой файл:

[imz@ovicaa ~]$ ssh vegro.alt
Last login: Mon May  9 17:01:12 2016 from 93.191.18.90
[imz@people ~]$ cd /tasks/164430/plan/
[imz@people plan]$ ls
add-bin  add-src  add-src+bin  add-srpm2arch  arepo-add-x86_64-i586  arepo-rm-x86_64-i586  bin.list.diff  change-arch  check_acl  del-src-N-I  next.bin  next.src  oldsrc2newsrpm  rip-src  rm-bin  rm-src  rm-src+bin  rm-srpm2arch  src.list.diff
[imz@people plan]$ cat arepo-*
[imz@people plan]$</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156647</commentid>
    <comment_count>3</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2016-05-09 19:01:40 +0300</bug_when>
    <thetext>Попробовал предложить исправление -- http://git.altlinux.org/people/imz/packages/?p=apt-repo.git . (Заодно свои старые хаки убрал для этого случая.)

Идея в том, чтобы проверить, пустой ли вывод curl.

Не проверял на task-ах, у которых arepo всё-таки есть.

Если попадётся такой task, на котором проверю, думаю, потом уже сразу собрать.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156648</commentid>
    <comment_count>4</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2016-05-09 19:08:45 +0300</bug_when>
    <thetext>Вроде работает:

[root@ovicaa ~]# ~imz/TOOLS/ALT-pkgs_misc/apt-repo/apt-repo
rpm [updates] http://ftp.altlinux.org/pub/distributions/ALTLinux t7/branch/x86_64 classic
rpm [updates] http://ftp.altlinux.org/pub/distributions/ALTLinux t7/branch/noarch classic
rpm [updates] http://ftp.altlinux.org/pub/distributions/ALTLinux t7/branch/x86_64-i586 classic
[root@ovicaa ~]# ~imz/TOOLS/ALT-pkgs_misc/apt-repo/apt-repo add 164428
[root@ovicaa ~]# ~imz/TOOLS/ALT-pkgs_misc/apt-repo/apt-repo
rpm [updates] http://ftp.altlinux.org/pub/distributions/ALTLinux t7/branch/x86_64 classic
rpm [updates] http://ftp.altlinux.org/pub/distributions/ALTLinux t7/branch/noarch classic
rpm [updates] http://ftp.altlinux.org/pub/distributions/ALTLinux t7/branch/x86_64-i586 classic
rpm http://git.altlinux.org repo/164428/x86_64 task
rpm http://git.altlinux.org repo/164428/x86_64-i586 task
[root@ovicaa ~]# apt-get update
Get:1 http://git.altlinux.org repo/164428/x86_64 release [553B]
Get:2 http://ftp.altlinux.org t7/branch/x86_64 release [896B]
Get:3 http://git.altlinux.org repo/164428/x86_64-i586 release [545B]
Get:4 http://ftp.altlinux.org t7/branch/noarch release [757B]
Get:5 http://ftp.altlinux.org t7/branch/x86_64-i586 release [555B]
Fetched 3306B in 0s (11,4kB/s)
Get:1 http://git.altlinux.org repo/164428/x86_64/task pkglist [77,4kB]
Hit http://ftp.altlinux.org t7/branch/x86_64/classic pkglist    
Get:2 http://git.altlinux.org repo/164428/x86_64/task release [132B]
Get:3 http://git.altlinux.org repo/164428/x86_64-i586/task pkglist [10,7kB]
Hit http://ftp.altlinux.org t7/branch/x86_64/classic release
Hit http://ftp.altlinux.org t7/branch/noarch/classic pkglist
Hit http://ftp.altlinux.org t7/branch/noarch/classic release
Hit http://ftp.altlinux.org t7/branch/x86_64-i586/classic pkglist
Hit http://ftp.altlinux.org t7/branch/x86_64-i586/classic release
Get:4 http://git.altlinux.org repo/164428/x86_64-i586/task release [137B]
Fetched 88,4kB in 0s (301kB/s)
Reading Package Lists... Done
Building Dependency Tree... Done
[root@ovicaa ~]#</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156649</commentid>
    <comment_count>5</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2016-05-09 19:26:42 +0300</bug_when>
    <thetext>apt-repo-1.3.4-alt1 -&gt; sisyphus:

* Mon May 09 2016 Ivan Zakharyaschev &lt;imz@altlinux&gt; 1.3.4-alt1
- task_has_arepo(): check whether plan/arepo-add-x86_64-i586 is not
  empty (ALT #31577).
- get rid of NO_TASK_AREPO_HACK environment variable (now, as
  task_has_arepo should work correctly).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156650</commentid>
    <comment_count>6</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2016-05-09 20:02:09 +0300</bug_when>
    <thetext>О, не работает для некоторых task-ов:

$ curl -s -w &apos;%{http_code}&apos; http://git.altlinux.org/tasks/164432/plan/arepo-add-x86_64-i586
&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML 2.0//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;
&lt;TITLE&gt;404 Not Found&lt;/TITLE&gt;
&lt;/HEAD&gt;&lt;BODY&gt;
&lt;H1&gt;Not Found&lt;/H1&gt;
The requested URL /tasks/164432/plan/arepo-add-x86_64-i586 was not found on this server.&lt;P&gt;
&lt;/BODY&gt;&lt;/HTML&gt;
404

Понятно: noarch task-и там дают 404, а arch task-и без arepo дают там пустой файл. Надо было оба случая учесть. А я сменил правильную обработку первого случая на правильную обработку второго.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156651</commentid>
    <comment_count>7</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2016-05-09 20:46:36 +0300</bug_when>
    <thetext>apt-repo-1.3.5-alt1 -&gt; sisyphus:

* Mon May 09 2016 Ivan Zakharyaschev &lt;imz@altlinux&gt; 1.3.5-alt1
- handle both cases without arepo: none (noarch) or empty (ALT #31577).
- &quot;apt-repo test [task] &apos;&apos; pkg1 ...&quot; will install the packages without
  modifying APT repos. (With --hsh-apt-config, this feature is useful
  to do an install check for a package in a minimal system.)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>