Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v1 0/3] update_repo: improvements for removements
@ 2020-10-25  8:37 Alexander V. Tikhonov
  2020-10-25  8:37 ` [Tarantool-patches] [PATCH v1 1/3] update_repo: add message which file to remove Alexander V. Tikhonov
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Alexander V. Tikhonov @ 2020-10-25  8:37 UTC (permalink / raw)
  To: Kirill Yukhin; +Cc: tarantool-patches

Improved:
 - Implemented ability to remove opensuse-leap OS packages.
 - Updated help message on remove option.
 - Added message which file to remove to be sure that the
   needed files were searched to remove.

Github: https://github.com/tarantool/tarantool/tree/avtikhon/update_repo_add_message

Alexander V. Tikhonov (3):
  update_repo: add message which file to remove
  update_repo: correct help message on remove
  update_repo: correct remove routine

 tools/update_repo.sh | 40 +++++++++++++++++++++++++++-------------
 1 file changed, 27 insertions(+), 13 deletions(-)

-- 
2.25.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Tarantool-patches] [PATCH v1 1/3] update_repo: add message which file to remove
  2020-10-25  8:37 [Tarantool-patches] [PATCH v1 0/3] update_repo: improvements for removements Alexander V. Tikhonov
@ 2020-10-25  8:37 ` Alexander V. Tikhonov
  2020-10-25  8:37 ` [Tarantool-patches] [PATCH v1 2/3] update_repo: correct help message on remove Alexander V. Tikhonov
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Alexander V. Tikhonov @ 2020-10-25  8:37 UTC (permalink / raw)
  To: Kirill Yukhin; +Cc: tarantool-patches

Added message which file to remove to be sure that the needed files
were searched to remove.
---
 tools/update_repo.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/update_repo.sh b/tools/update_repo.sh
index 99896664d..8e43f2442 100755
--- a/tools/update_repo.sh
+++ b/tools/update_repo.sh
@@ -486,8 +486,10 @@ function remove_deb {
 
     # remove all found file by the given pattern in options
     for suffix in '-1_all.deb' '-1_amd64.deb' '-1.dsc' '-1.debian.tar.xz' '.orig.tar.xz' ; do
-        $aws ls "$bucket_path/$poolpath/${remove}$suffix" || continue
-        $aws rm "$bucket_path/$poolpath/${remove}$suffix"
+        file="$bucket_path/$poolpath/${remove}$suffix"
+        echo "Searching to remove: $file"
+        $aws ls "$file" || continue
+        $aws rm "$file"
     done
 }
 
@@ -878,6 +880,7 @@ function remove_rpm {
     # storage, but does not mentioned in the metadata.
     for suffix in 'x86_64' 'noarch' 'src'; do
         file="$bucket_path/$packpath/${remove}-1.${os}${option_dist}.${suffix}.rpm"
+        echo "Searching to remove: $file"
         $aws ls $file || continue
         $aws rm $file
     done
-- 
2.25.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Tarantool-patches] [PATCH v1 2/3] update_repo: correct help message on remove
  2020-10-25  8:37 [Tarantool-patches] [PATCH v1 0/3] update_repo: improvements for removements Alexander V. Tikhonov
  2020-10-25  8:37 ` [Tarantool-patches] [PATCH v1 1/3] update_repo: add message which file to remove Alexander V. Tikhonov
@ 2020-10-25  8:37 ` Alexander V. Tikhonov
  2020-10-25  8:37 ` [Tarantool-patches] [PATCH v1 3/3] update_repo: correct remove routine Alexander V. Tikhonov
  2020-11-26  9:35 ` [Tarantool-patches] [PATCH v1 0/3] update_repo: improvements for removements Kirill Yukhin
  3 siblings, 0 replies; 5+ messages in thread
From: Alexander V. Tikhonov @ 2020-10-25  8:37 UTC (permalink / raw)
  To: Kirill Yukhin; +Cc: tarantool-patches

Updated help message on remove option.
---
 tools/update_repo.sh | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/tools/update_repo.sh b/tools/update_repo.sh
index 8e43f2442..0d39f108d 100755
--- a/tools/update_repo.sh
+++ b/tools/update_repo.sh
@@ -112,20 +112,22 @@ EOF
          Remove package specified by version from S3 repository. It will remove
          all found appropriate source and binaries packages from the given S3
          repository, also the meta files will be corrected there.
-         Example of usage on 'tarantool-2.2.2.0' version:
+         Example of usage for DEB repositories on '2.2.2.0.<hash>' version:
+           ./tools/update_repo.sh -o=<OS> -d=<DIST> -b=<S3 repo> \\
+               -r=tarantool_2.2.2.0.<hash>
+           It will search and try to remove packages:
+             tarantool_2.2.2.0.<hash>-1_all.deb
+             tarantool_2.2.2.0.<hash>-1_amd64.deb
+             tarantool_2.2.2.0.<hash>-1.dsc
+             tarantool_2.2.2.0.<hash>-1.debian.tar.xz
+             tarantool_2.2.2.0.<hash>.orig.tar.xz
+         Example of usage for RPM repositories on '2.2.2.0' version:
            ./tools/update_repo.sh -o=<OS> -d=<DIST> -b=<S3 repo> \\
                -r=tarantool-2.2.2.0
-         It will search and try to remove packages:
-           - for DEB repositories:
-             tarantool-2.2.2.0-1_all.deb
-             tarantool-2.2.2.0-1_amd64.deb
-             tarantool-2.2.2.0-1.dsc
-             tarantool-2.2.2.0-1.debian.tar.xz
-             tarantool-2.2.2.0.orig.tar.xz
-           - for RPM repositories:
+           It will search and try to remove packages:
              x86_64/tarantool-2.2.2.0-1.*.x86_64.rpm
              x86_64/tarantool-2.2.2.0-1.*.noarch.rpm
-             SRPMS/tarantool-2.2.2.0--1.*.src.rpm
+             SRPMS/tarantool-2.2.2.0-1.*.src.rpm
     -f|--force
          Force updating the remote package with the local one despite the checksum difference
     -s|--skip_errors
-- 
2.25.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Tarantool-patches] [PATCH v1 3/3] update_repo: correct remove routine
  2020-10-25  8:37 [Tarantool-patches] [PATCH v1 0/3] update_repo: improvements for removements Alexander V. Tikhonov
  2020-10-25  8:37 ` [Tarantool-patches] [PATCH v1 1/3] update_repo: add message which file to remove Alexander V. Tikhonov
  2020-10-25  8:37 ` [Tarantool-patches] [PATCH v1 2/3] update_repo: correct help message on remove Alexander V. Tikhonov
@ 2020-10-25  8:37 ` Alexander V. Tikhonov
  2020-11-26  9:35 ` [Tarantool-patches] [PATCH v1 0/3] update_repo: improvements for removements Kirill Yukhin
  3 siblings, 0 replies; 5+ messages in thread
From: Alexander V. Tikhonov @ 2020-10-25  8:37 UTC (permalink / raw)
  To: Kirill Yukhin; +Cc: tarantool-patches

Implemented ability to remove opensuse-leap OS packages.
---
 tools/update_repo.sh | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tools/update_repo.sh b/tools/update_repo.sh
index 0d39f108d..581539719 100755
--- a/tools/update_repo.sh
+++ b/tools/update_repo.sh
@@ -881,7 +881,16 @@ function remove_rpm {
     # broken update left orphan files: they are present in the
     # storage, but does not mentioned in the metadata.
     for suffix in 'x86_64' 'noarch' 'src'; do
-        file="$bucket_path/$packpath/${remove}-1.${os}${option_dist}.${suffix}.rpm"
+        if [ "$os" == "opensuse-leap" ]; then 
+            # Open Build Service (openSUSE) does not follow the usual
+            # approach: 'Release' is like lp152.1.1, where the first
+            # '1' is $(RELEASE) RPM spec directive value and the second
+            # '1' is the number of rebuilds.
+            os_dist="lp"`echo $option_dist | sed 's#\.##g'`".1.1"
+        else
+            os_dist="1.${os}${option_dist}"
+        fi
+        file="$bucket_path/$packpath/${remove}-${os_dist}.${suffix}.rpm"
         echo "Searching to remove: $file"
         $aws ls $file || continue
         $aws rm $file
-- 
2.25.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Tarantool-patches] [PATCH v1 0/3] update_repo: improvements for removements
  2020-10-25  8:37 [Tarantool-patches] [PATCH v1 0/3] update_repo: improvements for removements Alexander V. Tikhonov
                   ` (2 preceding siblings ...)
  2020-10-25  8:37 ` [Tarantool-patches] [PATCH v1 3/3] update_repo: correct remove routine Alexander V. Tikhonov
@ 2020-11-26  9:35 ` Kirill Yukhin
  3 siblings, 0 replies; 5+ messages in thread
From: Kirill Yukhin @ 2020-11-26  9:35 UTC (permalink / raw)
  To: Alexander V. Tikhonov; +Cc: tarantool-patches

Hello,

On 25 Oct 11:37, Alexander V. Tikhonov wrote:
> Improved:
>  - Implemented ability to remove opensuse-leap OS packages.
>  - Updated help message on remove option.
>  - Added message which file to remove to be sure that the
>    needed files were searched to remove.
> 
> Github: https://github.com/tarantool/tarantool/tree/avtikhon/update_repo_add_message

I've checked your patchset into 1.10, 2.5, 2.6 and master.

--
Regards, Kirill Yukhin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-11-26  9:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-25  8:37 [Tarantool-patches] [PATCH v1 0/3] update_repo: improvements for removements Alexander V. Tikhonov
2020-10-25  8:37 ` [Tarantool-patches] [PATCH v1 1/3] update_repo: add message which file to remove Alexander V. Tikhonov
2020-10-25  8:37 ` [Tarantool-patches] [PATCH v1 2/3] update_repo: correct help message on remove Alexander V. Tikhonov
2020-10-25  8:37 ` [Tarantool-patches] [PATCH v1 3/3] update_repo: correct remove routine Alexander V. Tikhonov
2020-11-26  9:35 ` [Tarantool-patches] [PATCH v1 0/3] update_repo: improvements for removements Kirill Yukhin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox