Git Product home page Git Product logo

Comments (9)

Conan-Kudo avatar Conan-Kudo commented on June 11, 2024

I'd prefer to see us use subcommands or parameters, rather than making that assumption.

from dnfdragora.

Conan-Kudo avatar Conan-Kudo commented on June 11, 2024

(Note, Yumex-DNF code for this)

from dnfdragora.

kkofler avatar kkofler commented on June 11, 2024

The reason I suggest accepting the files on the command line directly, with no other parameter, is that that allows having the normal dnfdragora.desktop claim the RPM MIME type. You may want to add a %F to the Exec= line (which is ignored if you run it from the menu), but IIRC that is the default anyway.

If you require a special parameter in front of the files, you need a separate dnfdragora-localinstall.desktop to handle the MIME type.

from dnfdragora.

Conan-Kudo avatar Conan-Kudo commented on June 11, 2024

In that case, we might want to support that mode as well. The switches would be necessary for supporting modes other than install (such as forcing upgrade or doing removal). For symmetry, I'd keep an --install switch, too.

from dnfdragora.

anaselli avatar anaselli commented on June 11, 2024

It should be fixed now, do you think it is needed also for removing? Because i can see a package selection with the intent to install it by clicking or double clicking on it... but does removal make sense?

from dnfdragora.

kkofler avatar kkofler commented on June 11, 2024

The .desktop file part is still missing though. And as I explained in my previous comment, implementing that part would be easier if the code took RPM files to install directly, without an --install switch (as, e.g., Apper is doing), because then you could just have the normal dnfdragora.desktop accept RPMs. That is not possible if the switch is required, because if you try to run a .desktop file with Exec=dnfdragora --install %F from the menu, it will only ignore the %F and try to run dnfdragora --install, which will of course fail. So, in that case, you need a separate .desktop file.

Apper's command line works the way I am suggesting:

Usage: apper [options] [package]
Apper is an application to get and manage software

Options:
  -v, --version              Displays version information.
  -h, --help                 Displays this help.
  --updates                  Show updates
  --settings                 Show settings
  --backend-details          Show backend details
  --type <mime-type>         Mime type installer
  --name <name>              Package name installer
  --file <file>              Single file installer
  --resource <lang>          Font resource installer
  --catalog <file>           Catalog installer
  --author                   Show author information.
  --license                  Show license information.
  --desktopfile <file name>  The base file name of the desktop entry for this
                             application.

Arguments:
  [package]                  Package file to install

but interestingly, package installation is done by a separate org.kde.apper_installer.desktop for some reason that is not clear to me.

Yumex-DNF does things your way:

usage: app [-h] [-d] [-y] [--exit] [-I PACKAGE] [-R PACKAGE] [--updateall]

optional arguments:
  -h, --help            show this help message and exit
  -d, --debug
  -y, --yes             Answer yes/ok to all questions
  --exit                tell dnfdaemon dbus services used by yumex to exit
  -I PACKAGE, --install PACKAGE
                        Install Package
  -R PACKAGE, --remove PACKAGE
                        Remove Package
  --updateall           apply all available updates

and includes a dedicated yumex-dnf-local.desktop to support installation of local RPMs.

Either of the 2 solutions should be implemented:

  • add a dnfdragora-local.desktop modeled after yumex-dnf-local.desktop, or
  • accept RPMs on the command line without a switch and adjust dnfdragora.desktop to claim the MIME type.

Either way, there should be a .desktop file with

MimeType=application/x-rpm;application/x-redhat-package-manager;

(and the Exec= line should end in %F).

from dnfdragora.

anaselli avatar anaselli commented on June 11, 2024

Yes you are right, i will add a desktop file for it asap, but we need to add also localization for them, maybe later.

from dnfdragora.

Conan-Kudo avatar Conan-Kudo commented on June 11, 2024

@anaselli I've already got a desktop file to commit. I'll adjust everything to install one. :)

from dnfdragora.

Conan-Kudo avatar Conan-Kudo commented on June 11, 2024

Should be fixed by a934d59 now.

from dnfdragora.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.