Bug 407096

Summary: Wish - Allow Arch packages (.pkg.tar.gz) to be installed locally
Product: [Applications] Discover Reporter: Patrick Silva <bugseforuns>
Component: discoverAssignee: Dan Leinir Turthra Jensen <leinir>
Status: CONFIRMED ---    
Severity: wishlist CC: aleixpol, nate
Priority: NOR    
Version First Reported In: 5.15.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=410972
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 410972    

Description Patrick Silva 2019-04-30 14:30:03 UTC
SUMMARY
It would be very nice if we could install Arch packages locally,
in the same way we already can install both deb and rpm packages.

STEPS TO REPRODUCE
1. go to https://www.ocenaudio.com/download
2. scroll down and download the Arch package
3. try to install the downloaded Arch package using Discover

OBSERVED RESULT
it's impossible to install the downloaded package using Discover

EXPECTED RESULT
Discover installs the downloaded package

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.57.0
Qt Version: 5.13.0 beta3
Comment 1 Aleix Pol 2019-12-03 01:47:20 UTC
I'd like to implement this, but we'd need a mime type for it, which is what it takes on the desktop spec.

At the moment it's just a tar file, and I don't want to claim that Discover can open any tar file on ArchLinux:

$ kmimetypefinder5 flatpak-debug-1.1.2+200+g7a6e52ec-1-x86_64.pkg.tar.xz
application/x-xz-compressed-tar

If we had the mimetype it would be quite trivial to implement much like on deb and rpm. In fact, running plasma-discover mypkg.tar.xz should already work.
Comment 2 Nate Graham 2019-12-03 03:13:54 UTC
So I guess we need to add .pkg.tar.gz to shared-mime-info?
Comment 3 Patrick Silva 2019-12-03 16:46:37 UTC
(In reply to Aleix Pol from comment #1)
> In fact, running plasma-discover mypkg.tar.xz should already work.
It don't work. Discover says "Couldn't open file:///package.pkg.tar.xz".
Comment 4 2wxsy58236r3 2020-03-28 14:21:14 UTC
Note that the following extensions are all valid for Arch Linux:
.pkg.tar.gz
.pkg.tar.bz2
.pkg.tar.xz
.pkg.tar.zst
.pkg.tar.lzo
.pkg.tar.lrz
.pkg.tar.lz4
.pkg.tar.lz
.pkg.tar.Z
.pkg.tar (i.e. uncompressed)

Reference:
https://www.archlinux.org/pacman/makepkg.conf.5.html
Comment 5 Aleix Pol 2022-01-20 18:28:27 UTC
> So I guess we need to add .pkg.tar.gz to shared-mime-info?

Yes.

$ file nano-5.9-1-x86_64.pkg.tar.zst
nano-5.9-1-x86_64.pkg.tar.zst: Zstandard compressed data (v0.8+), Dictionary ID: None
$ kmimetypefinder nano-5.9-1-x86_64.pkg.tar.zst
application/x-zstd-compressed-tar

The alternative is tying discover to tars which wouldn't help anyone I'm afraid.