Bug 439335 - make pkcon and yum similar
Summary: make pkcon and yum similar
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: PackageKit
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Robin Norwood
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-28 03:36 UTC by Rahul Sundaram
Modified: 2013-03-13 05:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-13 13:56:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Rahul Sundaram 2008-03-28 03:36:06 UTC
Description of problem:

yum, apt and smart follow a very similar interface for basic tasks like install,
remove, update, upgrade etc. pkcon is dissimilar for seemingly no good reason. 

Examples:

You have to use get-updates instead of just update. It can't install multiple
packages simultaneously and so on. 

A similar interface would help end users from having to unlearn and relearn
commands for similar tasks.

Comment 1 Richard Hughes 2008-03-28 12:06:12 UTC
Sure, we'll be fixing the API in 0.1.11 to allow multiple package installs in
one transaction, like we did for multiple updates.

What about pkcon would you like to change?

* yum has "yum check-update" while pkcon has "pkcon get updates" - which is better?
* yum has "yum search foo" while pkcon has "pkcon search name foo" - as
PackageKit supports more than one type of search. We could perhaps assume "name"
if there are only two arguments.

Any others?

Richard.


Comment 2 Rahul Sundaram 2008-03-29 00:49:15 UTC
* yum update works. The equivalent in pkcon seems to be pkcon get updates. It
would be good to have to pkcon update too. IMO pkcon check-update makes sense as
well as since unlike yum, pkcon doesn't seem to ask for any confirmation on its
actions except removing packages. Maybe that behavior should be changed too? yum
-y <argument> works if I need to ask yum to continue without any confirmation.
Also yum erase and yum remove are aliases.

* yum install quake3-demo works in rawhide while pkcon install quake3-demo fails
for some odd reason. Just using that package as an example

* yum search foo searches everything. Maybe pkcon search <foo> should do a wide
search and users can specify parameters if they want to confine it. That seems
to follow the principle of least surprise

* The rough equivalent of yum upgrade seems to be pkcon update-system

* yum --enablerepo=<foo> enables the repository only for that particular session

* yum also supports a yum shell which I find very useful for repeat operations. 

* yum-utils has a number of additional utilities. Among them yumdownloader
downloads a binary and yumdownloader --source downloads the equivalent source
package in it's current directory. debuginfo-install makes it very easy to
install debuginfo packages. yum-builddep is useful for grabbing dependencies
against a source package. yum-complete-transaction allows someone to resume a
interrupted transaction. 

I have some more ideas if you want pkcon to support additional enhancements but
this should be enough for now. 







Comment 3 James Antill 2008-04-04 16:32:12 UTC

> * yum search foo searches everything.

 That's not true, yum search currently searches: name, summary, description, url

 With --showduplicates it also shows matches to older pkgs, and -v gives more
information ... but I think pkcon trying to re-implement all of the yum cmd line
UI is a losing battle, esp. for things like search which already basically work
for everyone.

 Having, "pkcon install/update/reinstall" have basically the same input UI is
probably as far as I'd go.


Comment 4 Rahul Sundaram 2008-04-04 16:48:31 UTC
I used "everything" in a loose form obviously. If you are implementing something
new and everybody else is used to yum,apt-get or smart you might as well as
follow the more or less the same parameters to avoid confusion.That's all I got
to say on this.  

Comment 5 Tim Lauridsen 2008-04-05 06:50:09 UTC
Rahul, i agree that pkcon could need some love, but i dont see the point to make
just like yum, currently pkcon is a 1:1 mapping of the pk API and not a full
blown   package manager cli.
PK is meant to be a cross distro tool, so it has to be more simple that a native
package manager cli's, it will be doom to try i integrate all possible features
of all packagemanagers.
We should focus on the making backends stable and the gui tools better and leave
the cli to native package managers IMO.
Maybe in the future there should be made a simple cross distro cli "pkcli" to do
simple stuff, but pkcon has to match the API, so it can be used to test and
debug the API. 

Comment 6 Rahul Sundaram 2008-04-05 12:12:35 UTC
1:1 mapping isn't necessary and was never requested. I can switch between
yum,apt and smart easily because the basic commands are very similar. Learning
pkcon requires unlearning what I have used for such a long time. Please make the
equivalent commands similar. That's all I am asking for. Again *similar*, not
just the same. 

I gave a long list above. One specific example: yum, apt and smart supports a
update/upgrade command while in pkcon it is called get updates. My request is to
avoid unnecessary differentiation. That's all. 

Comment 7 Tim Lauridsen 2008-04-06 15:17:05 UTC
pkcon is more an pk API test tool, to test the different backends, than a
package manager cli, this is why there is a 1:1 mapping of the API.
I agree a cli should not work that way, but it should be another tool .
Something like

pkcli install foo
pkcli remove bar
pkcli remove foobar
pkcli search someword
pkcli list updates/available/install

Very simple commands to day to day action, nothing fancy


Comment 8 Rahul Sundaram 2008-04-06 15:26:32 UTC
If this is just a testing tool, you might want to do two things

1) Don't install it by default
2) Mention that it is just a test tool in the man page. Currently it just says,
PackageKit console client. What you are envisioning as pkcli is what I was
hoping pkcon would be. 

Comment 9 Richard Hughes 2008-04-13 13:56:32 UTC
I don't think 1:1 pkcon to yum is that important. We're not replacing the yum
CLI, so I don't think it's important we wrap it. I've changed "pkcon
update-system" to "pkcon update". If you want to change any others, please can
you email the mailing list and we'll discuss there with the other developers.
Thanks.


Note You need to log in before you can comment on or make changes to this bug.