what do you want to see in future apt versions ?

Ralf Mardorf kde.lists at yahoo.com
Sun Jun 7 16:10:14 UTC 2020


On Sun, 7 Jun 2020 17:38:00 +0200, Tom H wrote:
>> Btw. I wonder if "--allow-downgrades" does anything at all. I noticed
>> that it doesn't allow downgrades on my 16.04 install, when I wrote
>> https://lists.ubuntu.com/archives/xubuntu-users/2020-June/011347.html
>> , so I needed to write the odd workaround.  
>
>I've never used it, but I've used '-o
>Dpkg::Options::="--force-downgrade"' with 'install
><package>=<version>' for a similar purpose.

When using <package>=<version> it's not needed to add the -o Dpkg
option, that's what I've done by the above link. Without
<package>=<version> the downgrade fails.

[weremouse at moonstudio ~]$ apt-cache show gvfs | grep V
Version: 2016:07-13-moonstudio
Version: 1.28.2-1ubuntu1~16.04.3
Version: 1.28.1-1ubuntu1
[weremouse at moonstudio ~]$ sudo apt install -o Dpkg::Options::="--force-downgrade" gvfs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gvfs is already the newest version (2016:07-13-moonstudio).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

It makes sense, that downgrade requires information about the wanted
version. It's just redundant to add --force-downgrade.

I wonder if an option to downgrade or upgrade from a local package to a
package from repos would be useful, to avoid something like

sudo apt install gvfs=$(apt-cache show gvfs | grep Version:\ 1 | head -1 | cut -d" " -f2)

if it's wanted to automatically care about upgrades.




More information about the ubuntu-users mailing list