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

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

    <bug>
          <bug_id>9026</bug_id>
          
          <creation_ts>2006-02-06 12:58:36 +0300</creation_ts>
          <short_desc>Separator, mismatch &quot;main.packages&quot; filesize.</short_desc>
          <delta_ts>2008-02-15 19:33:37 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>5</classification_id>
          <classification>Archive</classification>
          <product>Branch 3.0</product>
          <component>separator</component>
          <version>3.0</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Vadym Kononenko">konan</reporter>
          <assigned_to name="Anton Farygin">rider</assigned_to>
          <cc>mike</cc>
          
          <qa_contact name="at@altlinux.org">at</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>35444</commentid>
    <comment_count>0</comment_count>
    <who name="Vadym Kononenko">konan</who>
    <bug_when>2006-02-06 12:58:36 +0300</bug_when>
    <thetext>При генерации инсталяционного образа, список RPM файлов , которые копируются в    
каталог &quot;out/ALTLinux/RPMS.main&quot; при последовательных сборках и постоянной     
конфигурации разное... Изучив немного скрипты сепаратора, нашел, что список     
этих файлов читается из tmp/main.packages, но во время чтения списка данный     
файл меньше, его окончательного размера.    
Пример:    
Непосредственно перед чтением списка:    
-rw-r--r-- 1 root root 4096 Jan 31     
17:54 /home/hasher/_hasher/tmp/main.packages    
    
Реальный размер, измеренный после окончания процеса сборки:    
-rw-r--r-- 1 root root 16506 Jan 31     
17:54 /home/hasher/_hasher/tmp/main.packages    
    
Вот... :)    
Иногда этот файл вообще нулевой длины...    
Иногда такое творится с /home/hasher/_hasher/tmp/base.packages&quot;    
   
Для исправления ситуации как вариант можно добавить вызов &quot;sync&quot; перед чтением   
списка пакетов из файла &quot;$TMPDIR/$IDENT.packages&quot;.  
 
/usr/share/separator/functions 
... 
[skip] 
 
copypackages() 
{ 
    local WORKDIR APTBOX IDENT INSTALLDIR APTBOX TMPDIR INSTALLDIRS i OUTDIR 
    WORKDIR=$1 
    IDENT=$2 
    INSTALLDIR=$3 
    INSTALLDIRS=$4 
    OUTDIR=$5 
    APTBOX=&quot;$WORKDIR/aptbox&quot; 
    TMPDIR=&quot;$WORKDIR/tmp&quot; 
    [ -z &quot;$IDENT&quot; ] &amp;&amp; IDENT=&quot;packages&quot; 
    [ -d &quot;$APTBOX&quot; ] || Fatal &quot;Please, create $APTBOX first&quot; 
    [ -d &quot;$INSTALLDIR&quot; ] || mkdir -p &quot;$INSTALLDIR&quot; 
    Info &quot;removing old packages ($IDENT) ...&quot; 
    rm -f $INSTALLDIR/*0 
    Info &quot;copying new packages ($IDENT) ...&quot; 
 
    sync; 
#   ^^^^ 
    while read i 
    do 
        packagestatus &quot;$INSTALLDIRS&quot; `basename $i` $OUTDIR || continue 
        if ! curl $i -qs -o $INSTALLDIR/`basename $i`; then 
            echo &quot;Copy package $i to  $INSTALLDIR/`basename $i` failed !!!&quot; 
            exit 1 
        fi 
        echo -n &quot;.&quot; 
    done &lt; $TMPDIR/$IDENT.packages 
    echo &quot;&quot; 
} 
Steps to Reproduce:
1.Add line $(ls -l $TMPDIR/$IDENT.packages &gt;&gt; /tmp/separator.bug)  
after part of code in the file /usr/share/separator/functions  
...  
[skip]  
  
copypackages()  
{  
    local WORKDIR APTBOX IDENT INSTALLDIR APTBOX TMPDIR INSTALLDIRS i OUTDIR  
    WORKDIR=$1  
    IDENT=$2  
    INSTALLDIR=$3  
    INSTALLDIRS=$4  
    OUTDIR=$5  
    APTBOX=&quot;$WORKDIR/aptbox&quot;  
    TMPDIR=&quot;$WORKDIR/tmp&quot;  
    [ -z &quot;$IDENT&quot; ] &amp;&amp; IDENT=&quot;packages&quot;  
    [ -d &quot;$APTBOX&quot; ] || Fatal &quot;Please, create $APTBOX first&quot;  
    [ -d &quot;$INSTALLDIR&quot; ] || mkdir -p &quot;$INSTALLDIR&quot;  
    Info &quot;removing old packages ($IDENT) ...&quot;  
    rm -f $INSTALLDIR/*0  
    Info &quot;copying new packages ($IDENT) ...&quot;  
-&gt; Here &lt;-  
2. Build installer image  
3. Look to the file /tmp/separator.bug and compare included data with a data  
about the same file (&quot;$TMPDIR/$IDENT.packages&quot; or &quot;tmp/main.packages&quot;) in a 
current time.  
Actual Results:  
Data in the file /tmp/separator.bug and a data   
about the same file (&quot;$TMPDIR/$IDENT.packages&quot; or &quot;tmp/main.packages&quot;) in a  
current time is different. 

Expected Results:  
Data in the file /tmp/separator.bug and a data   
about the same file (&quot;$TMPDIR/$IDENT.packages&quot; or &quot;tmp/main.packages&quot;) in a  
current time is a same.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63473</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2008-02-15 19:33:37 +0300</bug_when>
    <thetext>apparently wontfix; use spt/mkimage</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>