[pve-devel] [PATCH proxmox-ve] Add a purge proxmox-ve to the warning message

Thomas Lamprecht t.lamprecht at proxmox.com
Sun Jan 6 17:56:48 CET 2019


On 1/3/19 9:30 AM, Wolfgang Bumiller wrote:
> On Wed, Nov 28, 2018 at 12:39:15PM +0100, Alwin Antreich wrote:
>> When the package proxmox-ve is not purged the apt config is still there and
>> hinders further use of apt, as it complains about the missing hook.
>>
>> Signed-off-by: Alwin Antreich <a.antreich at proxmox.com>
>> ---
>>  debian/apthook/pve-apt-hook | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/debian/apthook/pve-apt-hook b/debian/apthook/pve-apt-hook
>> index f925090..59e3a29 100755
>> --- a/debian/apthook/pve-apt-hook
>> +++ b/debian/apthook/pve-apt-hook
>> @@ -60,6 +60,7 @@ while (my $line = <$fh>) {
>>        $log->("\n");
>>        $log->("If you really you want to permanently remove '${check_package}' from your system, run the following command\n");
>>        $log->("\ttouch '${check_file}'\n");
>> +      $log->("run apt-get/apt purge ${check_package} to remove the meta-package\n");
> 
> Shouldn't we generally only use `apt` by now

We should at least ensure that we use the same 'apt*' everywhere.
If we really switch to recommend apt we need to do it in all docs, maybe on
the next major update. IIRC, we wanted to avoid to change it "just because",
and I remember an (off-list) argument that such a proposal was done with
aptitude a while ago. The difference here would be that apt stems from the same
packages as apt-get[1], while aptitude doesn't.

While I'm in favor of apt, as you do not need to remember which package related
command needs which binary needs, and further, you save some characters to type,
apt itself has (currently) no strict guarantee to be backward compatible:

> The apt(8) commandline is designed as an end-user tool and it may
> change behavior between versions. While it tries not to break backward
> compatibility this is not guaranteed either if a change seems
> beneficial for interactive use.
> 
> All features of apt(8) are available in dedicated APT tools like apt-
> get(8) and apt-cache(8) as well.  apt(8) just changes the default value
> of some options (see apt.conf(5) and specifically the Binary scope). So
> you should prefer using these commands (potentially with some
> additional options enabled) in your scripts as they keep backward
> compatibility as much as possible.
-- man 8 apt


So, while I do not believe that we run into trouble if we suggest apt for all
situations for users, we may still want to use apt-* tools in scripts, or
suggestions for non-interactive use (hook examples? not sure if we even have any of
those at the moment). Just as a note.


[1]: check /usr/bin files at: https://packages.debian.org/stretch/amd64/apt/filelist or
     with: dpkg -L apt|grep usr/bin

> 
>>        $log->("and repeat your apt-get/apt invocation.\n");
> 
> and also remove `apt-get/` from this line instead?
> 
>>        $log->("\n");
>>        $log->("If you are unsure why '$check_package' would be removed, please verify\n");
>> -- 
>> 2.11.0
> 




More information about the pve-devel mailing list