[Yum-devel] yum-queue UI?
David Christian
dbchrist at unity.ncsu.edu
Sat Mar 27 21:10:39 UTC 2004
Hi all,
Yum is a great program; I'm enjoying using it.
I've been working on yum-queue. Not quite ready to send the code out
(soon!) but there are some interface issues that need to be worked out:
1. Interface for multiple queues. You need to be able to select the
queue that you are adding-removing from, and create a new queue. Seth
suggested that you may want to have a queue of queues, where the first
queue would be run on the first instance, and then the next, so the
order of the queues may be important (of course, that idea could be
debated as well, if you like), so order must be manipulable
suggestion
yum-queue add-queue <queue-name> after <queue-name>
yum-queue remove-queue <queue-name>
yum-queue move-queue <queue-name> after <queue-name>
yum-queue -q <queue-name> <queue command> (default queue = default-queue)
where queue-command is, e.g. install <package>
2. Manipulating packages twice in a queue
Is it ever necessary/acceptable to have the same package mentioned twice
in the same queue? Consider the following examples:
Example 1:
yum-queue install gcc*
yum-queue remove gcc-2.1
Example 2:
yum-queue remove package-x
yum-queue install package-x
Example 3:
yum-queue install package-x
yum-queue remove package-x
It seems to me you might want to allow example 1 and 2 but not 3...but
perhaps there are some weird dependency reasons to do 3? Say, for
example, you want all the packages that package-x depends on (assuming
that the queue install will install dependencies for you) but not
pacakge-x itself, you could execute the commands in 3.
3. Removing items from a queue
First of all, there's no specified queue-removal syntax.
I suggest yum-queue del <packages>
Assuming that we do allow multiple package references in a queue, then
there is some more ambiguity.
Does del remove all mention of that package, or the first mention? I
suggest maybe a possibly more verbose syntax:
a) if there is only one mention of <package>, yum-queue del <package>
works.
b) if there are multiple mentions of <package>, yum-queue del <package>
fails, and prints out the multiple mentions of the package
c) in a case like b), yum-queue del insert <pacakge> or yum-queue del
update <package> will delete that specific command
yum-queue -q <queue-name>
As a side note, perhaps yum-queue del <command> sort of implies a
parallel syntax for adding things to the queue: yum-queue add <command>?
yum-queue add insert gcc*
4. Intra queue ordering
The comments about manipulating items twice in a queue implies that the
order of items within the queue matters. In this case, it might be
necessary to have commands for inserting into the middle of the queue.
Perhaps like this
yum-queue add before insert gcc* remove gcc-2.1
yum-queue move before insert gcc* gcc-2.1
5. Config file
The example given by seth has a config file entry in a queue which is
optional. How does that get there? It should be possible for this
config file to be different from the current config file being used,
which may specify the location of the queue file
Suggestion:
yum-queue -q <queue-name> config <file>
Or
yum-queue -q <queue-name> config none to remove line
Anyway, that may be a little too much detail for now
6. Groups. Possibility for groups
yum-queue group-add install <group>
*yum-queue install group <groups>
yum-queue group-install <groups>
* is my favorite.
====================
Suggested interface:
All commands have these options:
[-c config-file (default = '/etc/yum.conf')]
[-f queue-file (default = '/var/yum/yum.queue']
[-q queue-name (default = 'default')]
yum-queue [add] (install | update | remove) [group] (<packages> |
<groups>) [(after | before) [install | update | remove] [group]
(<package> | <group>)]
Note: add is implied if no command is listed
yum-queue del [install | update | remove] [group] (<packages> | <groups>)
yum-queue move [group] [install | update | remove] (<packages> |
<groups>) (after | before) [install | update | remove] [group]
(<package> | <group>)
yum-queue add-queue <queue> [(after | before) <queue>]
yum-queue del-queue <queue>
yum-queue move-queue <queue> after | before <queue>
yum-queue list
Note: will list all queues unless -q queue_name is added
yum-queue run [first]
Note: will run all queues unless -q queue_name is added
After a queue is run, it is removed
Please let me know what you think!
David
--
David Christian
All we know is the phenomenon: we spend our time sending messages to
each other, talking and trying to listen at the same time, exchanging
information. This seems to be our most urgent biological function; it is
what we do with our lives."
-- Lewis Thomas, "The Lives of a Cell"
The fact that an opinion has been widely held is no evidence that
it is not utterly absurd; indeed, in view of the silliness of the
majority of mankind, a widespread belief is more often likely to
be foolish than sensible.
-- Bertrand Russell, in "Marriage and Morals", 1929
More information about the Yum-devel
mailing list