<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p> </p>
    <div class="moz-forward-container">
      <p>LGTM<br>
      </p>
      <div class="moz-cite-prefix">On 20.11.2020 14:54, Alexander
        Tikhonov wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:1605873280.453108238@f404.i.mail.ru">
        <meta http-equiv="content-type" content="text/html;
          charset=UTF-8">
        <div><br>
          <br>
          <br>
          -------- Пересылаемое сообщение --------<br>
          От кого: Alexander V. Tikhonov <a
            class="moz-txt-link-rfc2396E"
            href="mailto:avtikhon@tarantool.org" moz-do-not-send="true"><avtikhon@tarantool.org></a><br>
          Кому: Kirill Yukhin <a class="moz-txt-link-rfc2396E"
            href="mailto:kyukhin@tarantool.org" moz-do-not-send="true"><kyukhin@tarantool.org></a><br>
          Копия: Alexander V. Tikhonov <a class="moz-txt-link-rfc2396E"
            href="mailto:avtikhon@tarantool.org" moz-do-not-send="true"><avtikhon@tarantool.org></a>,
          <a class="moz-txt-link-abbreviated"
            href="mailto:tarantool-patches@dev.tarantool.org"
            moz-do-not-send="true">tarantool-patches@dev.tarantool.org</a><br>
          Дата: Пятница, 6 ноября 2020, 21:04 +03:00<br>
          Тема: [PATCH v1] update_repo: fix Sources meta for modules<br>
           
          <div class="js-helper js-readmsg-msg">
            <div>
              <div id="style_16046858451626793357_BODY">Found that
                Sources file destroys when module uploaded without
                sources.<br>
                Also found that it could happen for Packages file on
                modules uploading<br>
                without binaries. To fix it was added additional its
                downloading from<br>
                S3 if in modules it was not updated and routine was not
                used.<br>
                ---<br>
                <br>
                Github: <a
href="https://github.com/tarantool/tarantool/tree/avtikhon/update_repo_meta_sources"
                  target="_blank" moz-do-not-send="true">https://github.com/tarantool/tarantool/tree/avtikhon/update_repo_meta_sources</a><br>
                <br>
                 tools/update_repo.sh | 20 ++++++++++++++------<br>
                 1 file changed, 14 insertions(+), 6 deletions(-)<br>
                <br>
                diff --git a/tools/update_repo.sh b/tools/update_repo.sh<br>
                index 99896664d..e056f8f0e 100755<br>
                --- a/tools/update_repo.sh<br>
                +++ b/tools/update_repo.sh<br>
                @@ -244,6 +244,16 @@ function update_deb_packfile {<br>
                     fi<br>
                 }<br>
                 <br>
                +function initiate_deb_metadata {<br>
                + distssuffix=$1<br>
                +<br>
                + # get the latest Packages/Sources files from S3 either
                create empty files<br>
                + mkdir -p `dirname $distssuffix` || :<br>
                + $aws ls "$bucket_path/$distssuffix" >/dev/null
                2>&1 && \<br>
                + $aws cp "$bucket_path/$distssuffix" $distssuffix.saved
                || \<br>
                + touch $distssuffix.saved<br>
                +}<br>
                +<br>
                 function update_deb_metadata {<br>
                     packpath=$1<br>
                     packtype=$2<br>
                @@ -251,12 +261,8 @@ function update_deb_metadata {<br>
                 <br>
                     file_exists=''<br>
                 <br>
                - if [ ! -f $packpath.saved ] ; then<br>
                - # get the latest Sources file from S3 either create
                empty file<br>
                - $aws ls "$bucket_path/$packpath" >/dev/null
                2>&1 && \<br>
                - $aws cp "$bucket_path/$packpath" $packpath.saved || \<br>
                - touch $packpath.saved<br>
                - fi<br>
                + # reinitiate if the new suffix used, not as used
                before<br>
                + [ -f $packpath.saved ] || initiate_deb_metadata
                $packpath<br>
                 <br>
                     [ "$remove" == "" ] || cp $packpath.saved $packpath<br>
                 <br>
                @@ -545,6 +551,7 @@ EOF<br>
                         updated_files=0<br>
                 <br>
                         # 1(binaries). use reprepro tool to generate
                Packages file<br>
                + initiate_deb_metadata
                dists/$loop_dist/$component/binary-amd64/Packages<br>
                         for deb in
                $ws/$debdir/$loop_dist/$component/*/*/*.deb ; do<br>
                             [ -f $deb ] || continue<br>
                             updated_deb=0<br>
                @@ -565,6 +572,7 @@ EOF<br>
                         done<br>
                 <br>
                         # 1(sources). use reprepro tool to generate
                Sources file<br>
                + initiate_deb_metadata
                dists/$loop_dist/$component/source/Sources<br>
                         for dsc in
                $ws/$debdir/$loop_dist/$component/*/*/*.dsc ; do<br>
                             [ -f $dsc ] || continue<br>
                             updated_dsc=0<br>
                --<br>
                2.25.1<br>
                 </div>
            </div>
          </div>
           
          <hr>
          <div> </div>
          <div data-signature-widget="container">
            <div data-signature-widget="content">
              <div>--<br>
                Alexander Tikhonov</div>
            </div>
          </div>
          <div> </div>
        </div>
      </blockquote>
    </div>
  </body>
</html>