-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DNF5] Text syntax for more precise definition of transaction objects, possibility to combine different types of objects and actions in the transaction #1223
Comments
|
Extended spec syntax would be nice, but does anyone need it now? For example:
It might make sense to introduce more options, such as
You could also combine it with various filters such as |
Not sure about the But besides that I find the suggested syntax overly complicated. I was thinking along the same lines with the |
I'd keep the If a new spec syntax is a thing, then we should make it easy to use and powerful & extensible.
Several ideas:
I personally prefer Open questions:
For completeness, zypper supports the following options (we probably don't want the options, but we want the features - probably as spec flags/modifiers)
Gentoo's emerge has an interesting option:
Arch Linux's pacman:
If you know about how the other package managers do it, please link it here. |
Due to difficulty with parsing I would be very careful with extending spec definition. Even a group syntax with We would like to install group base and package We would like to install module Or we can provide a capability of To add a new option to set install reason for newly installed packages sounds like a good idea. Anyway I will be happy to see reworked idea from @jrohel related to new capabilities how to define action target. |
What about |
|
Wrt. Gentoo, more importantly than
The docstring here is somewhat unclear but it basically does the same as But:
Maybe the Disregarding the particular syntax for specifying the type of the argument (though I do think we should have special syntax for that), I think we should leave out the action and reason (which is only really the Something like this seems simpler and easier on the users:
(using the originally suggested syntax for the specifiers just for the example) And for the reason
|
Container people want to install a package by its checksum (issue #833). The checksum is provided in primary.xml. The checksum could be added to here proposed query tags. |
Design a text syntax usable for the CLI (command line interface) that allows you to:
package
/group
/module
/...); solves [DNF5] Allow to install multiple object types (rpm/group/modules) in one transaction libdnf#1375package
/group
/module
) in one transactioninstall
/remove
/upgrade
/downgrade
/reinstall
/enable
/disable
) in one transaction; more powerfull than DNF commandswap
, can replace dnfshell
user
/dependency
/...)I have some ideas. One example of writing a transaction object is extending the
spec
argument withquery
andaction
:spec[?query][@action]
?query[@action]
Examples of use:
Install package "abc" in version>=2.4 from repository with id "test". Set reason
dependency
.microdnf install abc?version>=2.4&repo=test@reason=dependency
or
microdnf install ?name=abc&version>=2.4&repo=test@reason=dependency
More action types in one transaction. Replace package
abc
with packagexyz
- swap.microdnf install xyz abc@action=remove
Mix instalation of package "abc" and module "xyz" in one transaction.
microdnf install abc xyz?type=module
Installs the package providing the required provide.
microdnf install '?provides=abc > 5'
Examples of supported attributes and actions:
query keys:
type
(package
,module
,group
, ...),name
,epoch
,version
,release
,arch
,provides
,requires
,repo
,reason
(user
,dependency
,group
,not_installed
)action keys:
reason
- (user
,dependency
, ...),action
(install
,remove
,upgrade
,downgrade
,reinstall
,enable
,disable
)This is a proposal. No promise that this will be in microdnf. Please let me know what you think. Alternatively, how to improve the syntax.
The text was updated successfully, but these errors were encountered: