From: "Alexander V. Tikhonov" <avtikhon@tarantool.org> To: Kirill Yukhin <kyukhin@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [PATCH v1] update_repo: fix Sources meta for modules Date: Fri, 6 Nov 2020 21:04:03 +0300 [thread overview] Message-ID: <1ed6bc2b5e6eed9221ead8f7f93c2a20c6978703.1604685774.git.avtikhon@tarantool.org> (raw) Found that Sources file destroys when module uploaded without sources. Also found that it could happen for Packages file on modules uploading without binaries. To fix it was added additional its downloading from S3 if in modules it was not updated and routine was not used. --- Github: https://github.com/tarantool/tarantool/tree/avtikhon/update_repo_meta_sources tools/update_repo.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/tools/update_repo.sh b/tools/update_repo.sh index 99896664d..e056f8f0e 100755 --- a/tools/update_repo.sh +++ b/tools/update_repo.sh @@ -244,6 +244,16 @@ function update_deb_packfile { fi } +function initiate_deb_metadata { + distssuffix=$1 + + # get the latest Packages/Sources files from S3 either create empty files + mkdir -p `dirname $distssuffix` || : + $aws ls "$bucket_path/$distssuffix" >/dev/null 2>&1 && \ + $aws cp "$bucket_path/$distssuffix" $distssuffix.saved || \ + touch $distssuffix.saved +} + function update_deb_metadata { packpath=$1 packtype=$2 @@ -251,12 +261,8 @@ function update_deb_metadata { file_exists='' - if [ ! -f $packpath.saved ] ; then - # get the latest Sources file from S3 either create empty file - $aws ls "$bucket_path/$packpath" >/dev/null 2>&1 && \ - $aws cp "$bucket_path/$packpath" $packpath.saved || \ - touch $packpath.saved - fi + # reinitiate if the new suffix used, not as used before + [ -f $packpath.saved ] || initiate_deb_metadata $packpath [ "$remove" == "" ] || cp $packpath.saved $packpath @@ -545,6 +551,7 @@ EOF updated_files=0 # 1(binaries). use reprepro tool to generate Packages file + initiate_deb_metadata dists/$loop_dist/$component/binary-amd64/Packages for deb in $ws/$debdir/$loop_dist/$component/*/*/*.deb ; do [ -f $deb ] || continue updated_deb=0 @@ -565,6 +572,7 @@ EOF done # 1(sources). use reprepro tool to generate Sources file + initiate_deb_metadata dists/$loop_dist/$component/source/Sources for dsc in $ws/$debdir/$loop_dist/$component/*/*/*.dsc ; do [ -f $dsc ] || continue updated_dsc=0 -- 2.25.1
next reply other threads:[~2020-11-06 18:04 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-06 18:04 Alexander V. Tikhonov [this message] 2020-11-26 9:32 ` Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1ed6bc2b5e6eed9221ead8f7f93c2a20c6978703.1604685774.git.avtikhon@tarantool.org \ --to=avtikhon@tarantool.org \ --cc=kyukhin@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v1] update_repo: fix Sources meta for modules' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox