This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 9c4faee97b GH-48616: [GLib] Use `Arrow-${MAJOR}.${MINOR}.typelib` not 
`Arrow-1.0.typelib` (#48617)
9c4faee97b is described below

commit 9c4faee97b88462fed9f4c6480087e9cb3b2e1c3
Author: Sutou Kouhei <[email protected]>
AuthorDate: Tue Dec 23 10:17:41 2025 +0900

    GH-48616: [GLib] Use `Arrow-${MAJOR}.${MINOR}.typelib` not 
`Arrow-1.0.typelib` (#48617)
    
    ### Rationale for this change
    
    Our deb/RPM GLib library packages include version information such as 
`libarrow2300-glib.deb` and `arrow2300-glib-libs.rpm`. It's for installing 
multiple versions in the same system.
    
    But all version library packages include `Arrow-1.0.typelib`. If we install 
multiple GLib library package versions in the same system, `Arrow-1.0.typelib` 
is conflicted.
    
    If we use `Arrow-${MAJOR}.${MINOR}.typelib` not `Arrow-1.0.typelib`, we can 
really install multiple GLib library package versions in the same system.
    
    ### What changes are included in this PR?
    
    * Use `XXX-${MAJOR}.${MINOR}.{gir,typelib}` not `XXX-1.0.{gir,typelib}`
    * Update release script to substitute versions automatically
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    Yes.
    * GitHub Issue: #48616
    
    Authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 .editorconfig                                      |  4 +++
 c_glib/arrow-cuda-glib/meson.build                 |  6 ++--
 c_glib/arrow-dataset-glib/meson.build              |  8 ++---
 c_glib/arrow-flight-glib/meson.build               |  8 ++---
 c_glib/arrow-flight-sql-glib/meson.build           | 15 +++++---
 .../{Arrow-1.0.metadata => Arrow.metadata}         |  0
 c_glib/arrow-glib/meson.build                      |  7 ++--
 c_glib/doc/meson.build                             |  2 --
 c_glib/example/lua/meson.build                     |  2 --
 c_glib/example/meson.build                         |  2 --
 c_glib/example/vala/meson.build                    |  2 --
 c_glib/gandiva-glib/meson.build                    |  8 ++---
 c_glib/meson.build                                 |  6 ++--
 c_glib/meson_options.txt                           |  2 --
 c_glib/parquet-glib/meson.build                    |  8 ++---
 dev/release/01-prepare-test.rb                     | 16 ++++++---
 dev/release/post-10-bump-versions-test.rb          | 16 ++++++---
 dev/release/test-helper.rb                         |  8 +++++
 dev/release/utils-prepare.sh                       | 41 +++++++++++++++++-----
 .../linux-packages/apache-arrow/debian/control.in  | 40 ++++++++++-----------
 ...arrow-1.0.install => gir1.2-arrow-23.0.install} |  0
 ...-1.0.install => gir1.2-arrow-cuda-23.0.install} |  0
 ...0.install => gir1.2-arrow-dataset-23.0.install} |  0
 ....0.install => gir1.2-arrow-flight-23.0.install} |  0
 ...nstall => gir1.2-arrow-flight-sql-23.0.install} |  0
 ...iva-1.0.install => gir1.2-gandiva-23.0.install} |  0
 ...uet-1.0.install => gir1.2-parquet-23.0.install} |  0
 27 files changed, 124 insertions(+), 77 deletions(-)

diff --git a/.editorconfig b/.editorconfig
index 67b30b62ad..58ce275510 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -42,6 +42,10 @@ indent_style = space
 indent_size = 2
 indent_style = space
 
+[{meson.build,meson_options.txt}]
+indent_size = 4
+indent_style = space
+
 [*.cs]
 indent_size = 4
 indent_style = space
diff --git a/c_glib/arrow-cuda-glib/meson.build 
b/c_glib/arrow-cuda-glib/meson.build
index d80145aedd..0e13b6cf1e 100644
--- a/c_glib/arrow-cuda-glib/meson.build
+++ b/c_glib/arrow-cuda-glib/meson.build
@@ -1,5 +1,3 @@
-# -*- indent-tabs-mode: nil -*-
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -77,7 +75,7 @@ endif
 if have_gi
     gir_dependencies = [declare_dependency(sources: arrow_glib_gir)]
     gir_extra_args = gir_scanner_extra_args + [
-        '--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
+        
'--include-uninstalled=arrow-glib/Arrow-@[email protected]'.format(gi_api_version),
     ]
     arrow_cuda_glib_gir = gnome.generate_gir(
         libarrow_cuda_glib,
@@ -86,7 +84,7 @@ if have_gi
         extra_args: gir_extra_args,
         header: 'arrow-cuda-glib/arrow-cuda-glib.h',
         identifier_prefix: 'GArrowCUDA',
-        includes: ['Arrow-1.0'],
+        includes: ['Arrow-@0@'.format(gi_api_version)],
         kwargs: generate_gi_common_args,
         namespace: 'ArrowCUDA',
         sources: sources + c_headers,
diff --git a/c_glib/arrow-dataset-glib/meson.build 
b/c_glib/arrow-dataset-glib/meson.build
index 62cc7b1662..9aac7c375c 100644
--- a/c_glib/arrow-dataset-glib/meson.build
+++ b/c_glib/arrow-dataset-glib/meson.build
@@ -1,5 +1,3 @@
-# -*- indent-tabs-mode: nil -*-
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -120,11 +118,13 @@ if have_gi
         dependencies: declare_dependency(sources: arrow_glib_gir),
         export_packages: 'arrow-dataset-glib',
         extra_args: gir_scanner_extra_args + [
-            '--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
+            '--include-uninstalled=arrow-glib/Arrow-@[email protected]'.format(
+                gi_api_version,
+            ),
         ],
         header: 'arrow-dataset-glib/arrow-dataset-glib.h',
         identifier_prefix: 'GADataset',
-        includes: ['Arrow-1.0'],
+        includes: ['Arrow-@0@'.format(gi_api_version)],
         kwargs: generate_gi_common_args,
         namespace: 'ArrowDataset',
         sources: sources + c_headers + enums,
diff --git a/c_glib/arrow-flight-glib/meson.build 
b/c_glib/arrow-flight-glib/meson.build
index be89cf772a..97e7031299 100644
--- a/c_glib/arrow-flight-glib/meson.build
+++ b/c_glib/arrow-flight-glib/meson.build
@@ -1,5 +1,3 @@
-# -*- indent-tabs-mode: nil -*-
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -84,11 +82,13 @@ if have_gi
         dependencies: declare_dependency(sources: arrow_glib_gir),
         export_packages: 'arrow-flight-glib',
         extra_args: gir_scanner_extra_args + [
-            '--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
+            '--include-uninstalled=arrow-glib/Arrow-@[email protected]'.format(
+                gi_api_version,
+            ),
         ],
         header: 'arrow-flight-glib/arrow-flight-glib.h',
         identifier_prefix: 'GAFlight',
-        includes: ['Arrow-1.0'],
+        includes: ['Arrow-@0@'.format(gi_api_version)],
         kwargs: generate_gi_common_args,
         namespace: 'ArrowFlight',
         sources: sources + c_headers,
diff --git a/c_glib/arrow-flight-sql-glib/meson.build 
b/c_glib/arrow-flight-sql-glib/meson.build
index 0b8a158bbc..abf3e0ddee 100644
--- a/c_glib/arrow-flight-sql-glib/meson.build
+++ b/c_glib/arrow-flight-sql-glib/meson.build
@@ -1,5 +1,3 @@
-# -*- indent-tabs-mode: nil -*-
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -82,12 +80,19 @@ if have_gi
         dependencies: arrow_flight_sql_glib_gir_dependencies,
         export_packages: 'arrow-flight-sql-glib',
         extra_args: gir_scanner_extra_args + [
-            '--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
-            '--include-uninstalled=./arrow-flight-glib/ArrowFlight-1.0.gir',
+            '--include-uninstalled=arrow-glib/Arrow-@[email protected]'.format(
+                gi_api_version,
+            ),
+            
'--include-uninstalled=arrow-flight-glib/ArrowFlight-@[email protected]'.format(
+                gi_api_version,
+            ),
         ],
         header: 'arrow-flight-sql-glib/arrow-flight-sql-glib.h',
         identifier_prefix: 'GAFlightSQL',
-        includes: ['Arrow-1.0', 'ArrowFlight-1.0'],
+        includes: [
+            'Arrow-@0@'.format(gi_api_version),
+            'ArrowFlight-@0@'.format(gi_api_version),
+        ],
         kwargs: generate_gi_common_args,
         namespace: 'ArrowFlightSQL',
         sources: sources + c_headers,
diff --git a/c_glib/arrow-glib/Arrow-1.0.metadata 
b/c_glib/arrow-glib/Arrow.metadata
similarity index 100%
rename from c_glib/arrow-glib/Arrow-1.0.metadata
rename to c_glib/arrow-glib/Arrow.metadata
diff --git a/c_glib/arrow-glib/meson.build b/c_glib/arrow-glib/meson.build
index 023b02e012..c53aee7240 100644
--- a/c_glib/arrow-glib/meson.build
+++ b/c_glib/arrow-glib/meson.build
@@ -1,5 +1,3 @@
-# -*- indent-tabs-mode: nil -*-
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -280,6 +278,11 @@ if have_gi
     )
 
     if generate_vapi
+        configure_file(
+            copy: true,
+            input: 'Arrow.metadata',
+            output: 'Arrow-@[email protected]'.format(gi_api_version),
+        )
         arrow_glib_vapi = gnome.generate_vapi(
             'arrow-glib',
             install: true,
diff --git a/c_glib/doc/meson.build b/c_glib/doc/meson.build
index 2cdefd4819..82f300aa03 100644
--- a/c_glib/doc/meson.build
+++ b/c_glib/doc/meson.build
@@ -1,5 +1,3 @@
-# -*- indent-tabs-mode: nil -*-
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
diff --git a/c_glib/example/lua/meson.build b/c_glib/example/lua/meson.build
index 8994da1517..f191f370b3 100644
--- a/c_glib/example/lua/meson.build
+++ b/c_glib/example/lua/meson.build
@@ -1,5 +1,3 @@
-# -*- indent-tabs-mode: nil -*-
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
diff --git a/c_glib/example/meson.build b/c_glib/example/meson.build
index 99b9b8ae22..5f1adca128 100644
--- a/c_glib/example/meson.build
+++ b/c_glib/example/meson.build
@@ -1,5 +1,3 @@
-# -*- indent-tabs-mode: nil -*-
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
diff --git a/c_glib/example/vala/meson.build b/c_glib/example/vala/meson.build
index 893b7a5198..cd5d77f42b 100644
--- a/c_glib/example/vala/meson.build
+++ b/c_glib/example/vala/meson.build
@@ -1,5 +1,3 @@
-# -*- indent-tabs-mode: nil -*-
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
diff --git a/c_glib/gandiva-glib/meson.build b/c_glib/gandiva-glib/meson.build
index c609526a6c..99fdc12381 100644
--- a/c_glib/gandiva-glib/meson.build
+++ b/c_glib/gandiva-glib/meson.build
@@ -1,5 +1,3 @@
-# -*- indent-tabs-mode: nil -*-
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -124,11 +122,13 @@ if have_gi
         dependencies: declare_dependency(sources: arrow_glib_gir),
         export_packages: 'gandiva-glib',
         extra_args: gir_scanner_extra_args + [
-            '--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
+            '--include-uninstalled=arrow-glib/Arrow-@[email protected]'.format(
+                gi_api_version,
+            ),
         ],
         header: 'gandiva-glib/gandiva-glib.h',
         identifier_prefix: 'GGandiva',
-        includes: ['Arrow-1.0'],
+        includes: ['Arrow-@0@'.format(gi_api_version)],
         kwargs: generate_gi_common_args,
         namespace: 'Gandiva',
         sources: sources + c_headers + enums,
diff --git a/c_glib/meson.build b/c_glib/meson.build
index e51024f6fa..be60b91dfb 100644
--- a/c_glib/meson.build
+++ b/c_glib/meson.build
@@ -1,5 +1,3 @@
-# -*- indent-tabs-mode: nil -*-
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -50,7 +48,7 @@ version_minor = version_numbers[1].to_int()
 version_micro = version_numbers[2].to_int()
 version_no_snapshot = '.'.join(version_numbers)
 
-api_version = '1.0'
+gi_api_version = '@0@.@1@'.format(version_major, version_minor)
 so_version = version_major * 100 + version_minor
 so_version_patch = version_micro
 library_version = '@0@.@1@.@2@'.format(so_version, so_version_patch, 0)
@@ -71,7 +69,7 @@ pkgconfig_variables = []
 
 base_include_directories = [include_directories('.')]
 
-generate_gi_common_args = {'install': true, 'nsversion': api_version}
+generate_gi_common_args = {'install': true, 'nsversion': gi_api_version}
 if get_option('werror')
     generate_gi_common_args += {'fatal_warnings': true}
 endif
diff --git a/c_glib/meson_options.txt b/c_glib/meson_options.txt
index e2aa74872d..4b58a4abe4 100644
--- a/c_glib/meson_options.txt
+++ b/c_glib/meson_options.txt
@@ -1,5 +1,3 @@
-# -*- indent-tabs-mode: nil -*-
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
diff --git a/c_glib/parquet-glib/meson.build b/c_glib/parquet-glib/meson.build
index 4d1931199f..d14fbc6118 100644
--- a/c_glib/parquet-glib/meson.build
+++ b/c_glib/parquet-glib/meson.build
@@ -1,5 +1,3 @@
-# -*- indent-tabs-mode: nil -*-
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -98,11 +96,13 @@ if have_gi
         dependencies: declare_dependency(sources: arrow_glib_gir),
         export_packages: 'parquet-glib',
         extra_args: gir_scanner_extra_args + [
-            '--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
+            '--include-uninstalled=arrow-glib/Arrow-@[email protected]'.format(
+                gi_api_version,
+            ),
         ],
         header: 'parquet-glib/parquet-glib.h',
         identifier_prefix: 'GParquet',
-        includes: ['Arrow-1.0'],
+        includes: ['Arrow-@0@'.format(gi_api_version)],
         kwargs: generate_gi_common_args,
         namespace: 'Parquet',
         sources: sources + c_headers,
diff --git a/dev/release/01-prepare-test.rb b/dev/release/01-prepare-test.rb
index 1d758f501e..22afe61800 100644
--- a/dev/release/01-prepare-test.rb
+++ b/dev/release/01-prepare-test.rb
@@ -61,10 +61,14 @@ class PrepareTest < Test::Unit::TestCase
     changes = parse_patch(git("log", "-p", "#{current_commit}.."))
     sampled_changes = changes.collect do |change|
       first_hunk = change[:hunks][0]
-      first_removed_line = first_hunk.find { |line| line.start_with?("-") }
-      first_added_line = first_hunk.find { |line| line.start_with?("+") }
+      first_removed_line = first_hunk.find {|line| line.start_with?("-")}
+      first_added_line = first_hunk.find {|line| line.start_with?("+")}
+      last_hunk = change[:hunks][-1]
+      last_removed_line = last_hunk.find {|line| line.start_with?("-")}
+      last_added_line = last_hunk.find {|line| line.start_with?("+")}
       {
-        sampled_diff: [first_removed_line, first_added_line],
+        first_sampled_diff: [first_removed_line, first_added_line],
+        last_sampled_diff: [last_removed_line, last_added_line],
         path: change[:path],
       }
     end
@@ -72,10 +76,14 @@ class PrepareTest < Test::Unit::TestCase
     when :major, :minor
       expected_changes = [
         {
-          sampled_diff: [
+          first_sampled_diff: [
             "-Package: libarrow#{@snapshot_so_version}",
             "+Package: libarrow#{@so_version}",
           ],
+          last_sampled_diff: [
+            "-  gir1.2-parquet-#{@snapshot_gi_api_version} (= 
${binary:Version}),",
+            "+  gir1.2-parquet-#{@gi_api_version} (= ${binary:Version}),",
+          ],
           path: "dev/tasks/linux-packages/apache-arrow/debian/control.in",
         },
       ]
diff --git a/dev/release/post-10-bump-versions-test.rb 
b/dev/release/post-10-bump-versions-test.rb
index 3818339396..aad4d7c699 100644
--- a/dev/release/post-10-bump-versions-test.rb
+++ b/dev/release/post-10-bump-versions-test.rb
@@ -381,20 +381,28 @@ class PostBumpVersionsTest < Test::Unit::TestCase
     changes = parse_patch(log)
     sampled_changes = changes.collect do |change|
       first_hunk = change[:hunks][0]
-      first_removed_line = first_hunk.find { |line| line.start_with?("-") }
-      first_added_line = first_hunk.find { |line| line.start_with?("+") }
+      first_removed_line = first_hunk.find {|line| line.start_with?("-")}
+      first_added_line = first_hunk.find {|line| line.start_with?("+")}
+      last_hunk = change[:hunks][-1]
+      last_removed_line = last_hunk.find {|line| line.start_with?("-")}
+      last_added_line = last_hunk.find {|line| line.start_with?("+")}
       {
-        sampled_diff: [first_removed_line, first_added_line],
+        first_sampled_diff: [first_removed_line, first_added_line],
+        last_sampled_diff: [last_removed_line, last_added_line],
         path: change[:path],
       }
     end
     if bump_type.nil?
       expected_changes = [
         {
-          sampled_diff: [
+          first_sampled_diff: [
             "-Package: libarrow#{@so_version}",
             "+Package: libarrow#{@next_so_version}",
           ],
+          last_sampled_diff: [
+            "-  gir1.2-parquet-#{@gi_api_version} (= ${binary:Version}),",
+            "+  gir1.2-parquet-#{@next_gi_api_version} (= ${binary:Version}),",
+          ],
           path: "dev/tasks/linux-packages/apache-arrow/debian/control.in",
         },
       ]
diff --git a/dev/release/test-helper.rb b/dev/release/test-helper.rb
index 9cb8315c2f..45c0065ba1 100644
--- a/dev/release/test-helper.rb
+++ b/dev/release/test-helper.rb
@@ -113,6 +113,7 @@ module VersionDetectable
     @snapshot_version = cpp_cmake_lists.read[/ARROW_VERSION "(.+?)"/, 1]
     @snapshot_major_version = @snapshot_version.split(".")[0]
     @snapshot_so_version = compute_so_version(@snapshot_version.split("-")[0])
+    @snapshot_gi_api_version = 
compute_gi_api_version(@snapshot_version.split("-")[0])
     release_version = @snapshot_version.gsub(/-SNAPSHOT\z/, "")
     release_version_components = release_version.split(".")
     case release_type
@@ -129,6 +130,7 @@ module VersionDetectable
     @release_version = release_version_components.join(".")
     @release_compatible_version = compute_compatible_version(@release_version)
     @so_version = compute_so_version(@release_version)
+    @gi_api_version = compute_gi_api_version(@release_version)
     next_version_components = @release_version.split(".")
     case next_release_type
     when :major
@@ -148,6 +150,7 @@ module VersionDetectable
     @next_compatible_version = compute_compatible_version(@next_version)
     @next_snapshot_version = "#{@next_version}-SNAPSHOT"
     @next_so_version = compute_so_version(@next_version)
+    @next_gi_api_version = compute_gi_api_version(@next_version)
     r_description = top_dir + "r" + "DESCRIPTION"
     @previous_version = r_description.read[/^Version: (.+?)\.9000$/, 1]
     if @previous_version
@@ -164,6 +167,11 @@ module VersionDetectable
     Integer(major, 10) * 100 + Integer(minor, 10)
   end
 
+  def compute_gi_api_version(version)
+    major, minor, _patch = version.split(".")
+    "#{major}.#{minor}"
+  end
+
   def on_release_branch?
     @snapshot_version == @release_version
   end
diff --git a/dev/release/utils-prepare.sh b/dev/release/utils-prepare.sh
index 27e7e12768..e67439467c 100644
--- a/dev/release/utils-prepare.sh
+++ b/dev/release/utils-prepare.sh
@@ -193,12 +193,22 @@ so_version() {
   expr ${major_version} \* 100 + ${minor_version}
 }
 
+gir_api_version() {
+  local version=$1
+  local major_version=$(echo ${version} | cut -d. -f1)
+  local minor_version=$(echo ${version} | cut -d. -f2)
+  echo "${major_version}.${minor_version}"
+}
+
 update_deb_package_names() {
   local version=$1
   local next_version=$2
   echo "Updating .deb package names for ${next_version}"
-  deb_lib_suffix=$(so_version ${version})
-  next_deb_lib_suffix=$(so_version ${next_version})
+
+  local substituted=false
+
+  local deb_lib_suffix=$(so_version ${version})
+  local next_deb_lib_suffix=$(so_version ${next_version})
   if [ "${deb_lib_suffix}" != "${next_deb_lib_suffix}" ]; then
     pushd ${ARROW_DIR}/dev/tasks/linux-packages/apache-arrow
     for target in debian*/lib*${deb_lib_suffix}.install; do
@@ -206,19 +216,34 @@ update_deb_package_names() {
         ${target} \
         $(echo ${target} | sed -e 
"s/${deb_lib_suffix}/${next_deb_lib_suffix}/")
     done
-    
deb_lib_suffix_substitute_pattern="s/(lib(arrow|gandiva|parquet)[-a-z]*)${deb_lib_suffix}/\\1${next_deb_lib_suffix}/g"
+    local 
deb_lib_suffix_substitute_pattern="s/(lib(arrow|gandiva|parquet)[-a-z]*)${deb_lib_suffix}/\\1${next_deb_lib_suffix}/g"
     sed -i.bak -E -e "${deb_lib_suffix_substitute_pattern}" debian*/control*
     rm -f debian*/control*.bak
     git add debian*/control*
+    substituted=true
     popd
+  fi
 
-    pushd ${ARROW_DIR}/dev/release
-    sed -i.bak -E -e "${deb_lib_suffix_substitute_pattern}" 
rat_exclude_files.txt
-    rm -f rat_exclude_files.txt.bak
-    git add rat_exclude_files.txt
-    git commit -m "MINOR: [Release] Update .deb package names for 
${next_version}"
+  local deb_gir_suffix=$(gir_api_version ${version})
+  local next_deb_gir_suffix=$(gir_api_version ${next_version})
+  if [ "${deb_gir_suffix}" != "${next_deb_gir_suffix}" ]; then
+    pushd ${ARROW_DIR}/dev/tasks/linux-packages/apache-arrow
+    for target in debian*/gir1.2-*-${deb_gir_suffix}.install; do
+      git mv \
+        ${target} \
+        $(echo ${target} | sed -e 
"s/${deb_gir_suffix}/${next_deb_gir_suffix}/")
+    done
+    local 
deb_gir_suffix_substitute_pattern="s/(gir1\\.2-(arrow|gandiva|parquet)[-a-z]*)${deb_gir_suffix}/\\1${next_deb_gir_suffix}/g"
+    sed -i.bak -E -e "${deb_gir_suffix_substitute_pattern}" debian*/control*
+    rm -f debian*/control*.bak
+    git add debian*/control*
+    substituted=true
     popd
   fi
+
+  if [ "${substituted}" = "true" ]; then
+    git commit -m "MINOR: [Release] Update .deb package names for 
${next_version}"
+  fi
 }
 
 update_linux_packages() {
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/control.in 
b/dev/tasks/linux-packages/apache-arrow/debian/control.in
index 2da597afdf..fd55804d33 100644
--- a/dev/tasks/linux-packages/apache-arrow/debian/control.in
+++ b/dev/tasks/linux-packages/apache-arrow/debian/control.in
@@ -330,7 +330,7 @@ Description: Apache Arrow is a data processing library for 
analysis
  .
  This package provides GLib based library files.
 
-Package: gir1.2-arrow-1.0
+Package: gir1.2-arrow-23.0
 Section: introspection
 Architecture: any
 Multi-Arch: same
@@ -348,7 +348,7 @@ Architecture: any
 Multi-Arch: same
 Depends:
   ${misc:Depends},
-  gir1.2-arrow-1.0 (= ${binary:Version}),
+  gir1.2-arrow-23.0 (= ${binary:Version}),
   libarrow-acero-dev (= ${binary:Version}),
   libglib2.0-dev
 Suggests: libarrow-glib-doc
@@ -381,14 +381,14 @@ Description: Apache Arrow is a data processing library 
for analysis
  .
  This package provides GLib based library files for CUDA support.
 
-Package: gir1.2-arrow-cuda-1.0
+Package: gir1.2-arrow-cuda-23.0
 Section: introspection
 Architecture: @CUDA_ARCHITECTURE@
 Multi-Arch: same
 Depends:
   ${gir:Depends},
   ${misc:Depends},
-  gir1.2-arrow-1.0 (= ${binary:Version}),
+  gir1.2-arrow-23.0 (= ${binary:Version}),
   libarrow-cuda-glib2300 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
@@ -400,7 +400,7 @@ Architecture: @CUDA_ARCHITECTURE@
 Multi-Arch: same
 Depends:
   ${misc:Depends},
-  gir1.2-arrow-cuda-1.0 (= ${binary:Version}),
+  gir1.2-arrow-cuda-23.0 (= ${binary:Version}),
   libarrow-cuda-dev (= ${binary:Version}),
   libarrow-glib-dev (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
@@ -421,14 +421,14 @@ Description: Apache Arrow is a data processing library 
for analysis
  .
  This package provides GLib based library files for dataset module.
 
-Package: gir1.2-arrow-dataset-1.0
+Package: gir1.2-arrow-dataset-23.0
 Section: introspection
 Architecture: any
 Multi-Arch: same
 Depends:
   ${gir:Depends},
   ${misc:Depends},
-  gir1.2-arrow-1.0 (= ${binary:Version}),
+  gir1.2-arrow-23.0 (= ${binary:Version}),
   libarrow-dataset-glib2300 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
@@ -440,7 +440,7 @@ Architecture: any
 Multi-Arch: same
 Depends:
   ${misc:Depends},
-  gir1.2-arrow-dataset-1.0 (= ${binary:Version}),
+  gir1.2-arrow-dataset-23.0 (= ${binary:Version}),
   libarrow-dataset-dev (= ${binary:Version}),
   libarrow-glib-dev (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
@@ -472,14 +472,14 @@ Description: Apache Arrow is a data processing library 
for analysis
  .
  This package provides GLib based library files for Apache Arrow Flight.
 
-Package: gir1.2-arrow-flight-1.0
+Package: gir1.2-arrow-flight-23.0
 Section: introspection
 Architecture: any
 Multi-Arch: same
 Depends:
   ${gir:Depends},
   ${misc:Depends},
-  gir1.2-arrow-1.0 (= ${binary:Version}),
+  gir1.2-arrow-23.0 (= ${binary:Version}),
   libarrow-flight-glib2300 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
@@ -492,7 +492,7 @@ Architecture: any
 Multi-Arch: same
 Depends:
   ${misc:Depends},
-  gir1.2-arrow-flight-1.0 (= ${binary:Version}),
+  gir1.2-arrow-flight-23.0 (= ${binary:Version}),
   libarrow-flight-dev (= ${binary:Version}),
   libarrow-glib-dev (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
@@ -524,14 +524,14 @@ Description: Apache Arrow is a data processing library 
for analysis
  .
  This package provides GLib based library files for Apache Arrow Flight SQL.
 
-Package: gir1.2-arrow-flight-sql-1.0
+Package: gir1.2-arrow-flight-sql-23.0
 Section: introspection
 Architecture: any
 Multi-Arch: same
 Depends:
   ${gir:Depends},
   ${misc:Depends},
-  gir1.2-arrow-flight-1.0 (= ${binary:Version}),
+  gir1.2-arrow-flight-23.0 (= ${binary:Version}),
   libarrow-flight-sql-glib2300 (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
  .
@@ -544,7 +544,7 @@ Architecture: any
 Multi-Arch: same
 Depends:
   ${misc:Depends},
-  gir1.2-arrow-flight-sql-1.0 (= ${binary:Version}),
+  gir1.2-arrow-flight-sql-23.0 (= ${binary:Version}),
   libarrow-flight-glib-dev (= ${binary:Version}),
   libarrow-flight-sql-dev (= ${binary:Version})
 Description: Apache Arrow is a data processing library for analysis
@@ -577,14 +577,14 @@ Description: Gandiva is a toolset for compiling and 
evaluating expressions
  .
  This package provides GLib based library files.
 
-Package: gir1.2-gandiva-1.0
+Package: gir1.2-gandiva-23.0
 Section: introspection
 Architecture: any
 Multi-Arch: same
 Depends:
   ${gir:Depends},
   ${misc:Depends},
-  gir1.2-arrow-1.0 (= ${binary:Version}),
+  gir1.2-arrow-23.0 (= ${binary:Version}),
   libgandiva-glib2300 (= ${binary:Version})
 Description: Gandiva is a toolset for compiling and evaluating expressions
  on Arrow Data.
@@ -597,7 +597,7 @@ Architecture: any
 Multi-Arch: same
 Depends:
   ${misc:Depends},
-  gir1.2-gandiva-1.0 (= ${binary:Version}),
+  gir1.2-gandiva-23.0 (= ${binary:Version}),
   libarrow-glib-dev (= ${binary:Version}),
   libgandiva-dev (= ${binary:Version})
 Description: Gandiva is a toolset for compiling and evaluating expressions
@@ -631,14 +631,14 @@ Description: Apache Parquet is a columnar storage format
  .
  This package provides GLib based library files.
 
-Package: gir1.2-parquet-1.0
+Package: gir1.2-parquet-23.0
 Section: introspection
 Architecture: any
 Multi-Arch: same
 Depends:
   ${gir:Depends},
   ${misc:Depends},
-  gir1.2-arrow-1.0 (= ${binary:Version}),
+  gir1.2-arrow-23.0 (= ${binary:Version}),
   libparquet-glib2300 (= ${binary:Version})
 Description: Apache Parquet is a columnar storage format
  .
@@ -650,7 +650,7 @@ Architecture: any
 Multi-Arch: same
 Depends:
   ${misc:Depends},
-  gir1.2-parquet-1.0 (= ${binary:Version}),
+  gir1.2-parquet-23.0 (= ${binary:Version}),
   libarrow-glib-dev (= ${binary:Version}),
   libparquet-dev (= ${binary:Version})
 Suggests: libparquet-glib-doc
diff --git 
a/dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-1.0.install 
b/dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-23.0.install
similarity index 100%
rename from 
dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-1.0.install
rename to dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-23.0.install
diff --git 
a/dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-cuda-1.0.install 
b/dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-cuda-23.0.install
similarity index 100%
rename from 
dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-cuda-1.0.install
rename to 
dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-cuda-23.0.install
diff --git 
a/dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-dataset-1.0.install 
b/dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-dataset-23.0.install
similarity index 100%
rename from 
dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-dataset-1.0.install
rename to 
dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-dataset-23.0.install
diff --git 
a/dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-flight-1.0.install 
b/dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-flight-23.0.install
similarity index 100%
rename from 
dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-flight-1.0.install
rename to 
dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-flight-23.0.install
diff --git 
a/dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-flight-sql-1.0.install
 
b/dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-flight-sql-23.0.install
similarity index 100%
rename from 
dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-flight-sql-1.0.install
rename to 
dev/tasks/linux-packages/apache-arrow/debian/gir1.2-arrow-flight-sql-23.0.install
diff --git 
a/dev/tasks/linux-packages/apache-arrow/debian/gir1.2-gandiva-1.0.install 
b/dev/tasks/linux-packages/apache-arrow/debian/gir1.2-gandiva-23.0.install
similarity index 100%
rename from 
dev/tasks/linux-packages/apache-arrow/debian/gir1.2-gandiva-1.0.install
rename to 
dev/tasks/linux-packages/apache-arrow/debian/gir1.2-gandiva-23.0.install
diff --git 
a/dev/tasks/linux-packages/apache-arrow/debian/gir1.2-parquet-1.0.install 
b/dev/tasks/linux-packages/apache-arrow/debian/gir1.2-parquet-23.0.install
similarity index 100%
rename from 
dev/tasks/linux-packages/apache-arrow/debian/gir1.2-parquet-1.0.install
rename to 
dev/tasks/linux-packages/apache-arrow/debian/gir1.2-parquet-23.0.install

Reply via email to