fluent / fluent-package-builder

td-agent (Fluentd) Building and Packaging System
Apache License 2.0
22 stars 25 forks source link

deb: refine fluentd-apt-source #515

Closed kenhys closed 1 year ago

kenhys commented 1 year ago
kenhys commented 1 year ago

Even though modified /etc/apt/sources.list.d/fluentd.sources to v5.

apt upgrade -V
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
   fluentd-apt-source (2023.6.29-1)
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
   fluent-apt-source (2023.6.29-1)
The following packages will be upgraded:
   fluentd-apt-source (2020.8.25-1 => 2023.6.29-1)
1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.5 kB of archives.
After this operation, 12.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://192.168.11.2/5/debian/bullseye bullseye/contrib amd64 fluentd-apt-source all 2023.6.29-1 [2688 B]
Get:2 http://192.168.11.2/5/debian/bullseye bullseye/contrib amd64 fluent-apt-source all 2023.6.29-1 [7828 B]
Fetched 10.5 kB in 0s (0 B/s)          
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 9429 files and directories currently installed.)
Preparing to unpack .../fluentd-apt-source_2023.6.29-1_all.deb ...
Unpacking fluentd-apt-source (2023.6.29-1) over (2020.8.25-1) ...
Selecting previously unselected package fluent-apt-source.
Preparing to unpack .../fluent-apt-source_2023.6.29-1_all.deb ...
Unpacking fluent-apt-source (2023.6.29-1) ...
Setting up fluent-apt-source (2023.6.29-1) ...

Configuration file '/etc/apt/sources.list.d/fluentd.sources'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** fluentd.sources (Y/I/N/O/D/Z) [default=N] ? y
Installing new version of config file /etc/apt/sources.list.d/fluentd.sources ...
Setting up fluentd-apt-source (2023.6.29-1) ...

fluentd-apt-source package can be removed because it is transitional package.

# dpkg -l |grep fluent
ii  fluent-apt-source         2023.6.29-1                  all          GnuPG archive key and APT source of the Fluent Package archive
ii  fluentd-apt-source        2023.6.29-1                  all          Transitional package for fluent-apt-source
root@12b06a1a3f97:/etc/apt/sources.list.d# dpkg -L fluentd-apt-source
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/fluentd-apt-source
/usr/share/doc/fluentd-apt-source/changelog.Debian.gz
/usr/share/doc/fluentd-apt-source/copyright
root@12b06a1a3f97:/etc/apt/sources.list.d# apt purge fluentd-apt-source
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  fluentd-apt-source*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 10.2 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 9432 files and directories currently installed.)
Removing fluentd-apt-source (2023.6.29-1) ...
(Reading database ... 9429 files and directories currently installed.)
Purging configuration files for fluentd-apt-source (2023.6.29-1) ...
kenhys commented 1 year ago

Thanks, I've fixed them.

kenhys commented 1 year ago

TODO: try Provides: also works as expected. It should be handled by another PR.

kenhys commented 1 year ago

If it removes the transitional package entry and use Provides:, it can't be upgraded even if you point to v5.

Before (transitional):

After (no transitional, use provides)

kenhys commented 1 year ago

As the former behavior is preferred, so stay as is.

daipom commented 1 year ago

Thanks for your check! Understood!