[pacman-dev] What about managing optional dependencies?
I'm not (yet :) a good C programmer, so it's just a hint, and I don't know if it's easily implementable in pacman, but sometimes there is software that works even without another one, but having this installed let you perform other functions (probably this sentence is bad written, hope you all know what an "optionale dependency" is ;) . As you know there is no way in pacman to handle this kind of dependency except writing a warning message in the .install . I think would be useful to have (at least) an array where to put this type of deps. Am I just a fool? -- Alessio 'mOLOk' Bolognino
On Thu, Oct 12, 2006 at 04:45:39PM +0200, Alessio 'mOLOk' Bolognino <themolok.ml@gmail.com> wrote:
type of deps. Am I just a fool?
there was an idea about this and the decision was "won't implement". but maybe time changes.. :) udv / greetings, VMiklos -- Developer of Frugalware Linux, to make things frugal - http://frugalware.org
Hi! 2006/10/12, VMiklos <vmiklos@frugalware.org>:
On Thu, Oct 12, 2006 at 04:45:39PM +0200, Alessio 'mOLOk' Bolognino <themolok.ml@gmail.com> wrote:
type of deps. Am I just a fool?
there was an idea about this and the decision was "won't implement". but maybe time changes.. :)
Instead ot post_install() stuff like this: echo ">> To use feature X install package Y" it may look like this in PKGBUILD: optdepends=(pkgY "allows to use X") optdepends=(pkgZ "adds ABCD feature") and this in pacman output: Optional dependencies: pkgY - allows to use X pkgZ - adds ABCD feature This is just a way to handle optional dependencies in a better way, IMHO. This is not something hard like USE flags. What do you think about this? -- Roman Kyrylych (Роман Кирилич)
2006/10/12, Roman Kyrylych <roman.kyrylych@gmail.com>:
it may look like this in PKGBUILD: optdepends=(pkgY "allows to use X") optdepends=(pkgZ "adds ABCD feature")
and this in pacman output: Optional dependencies: pkgY - allows to use X pkgZ - adds ABCD feature
This is just a way to handle optional dependencies in a better way, IMHO. This is not something hard like USE flags.
This way Pacman will know something about optional dependencies and use this info for something. For example, when user wants to remove a package, Pacman can search if this package's optional dependencies are not used by other packages and promt user to remove them too. IMHO this will be good feature. And it will allow to show optional dependencies in website package list too. -- Roman Kyrylych (Роман Кирилич)
On 10/12/06, Roman Kyrylych <roman.kyrylych@gmail.com> wrote:
This way Pacman will know something about optional dependencies and use this info for something. For example, when user wants to remove a package, Pacman can search if this package's optional dependencies are not used by other packages and promt user to remove them too. IMHO this will be good feature.
At this point something like this is a low priority. If you really want a feature like this, feel free to submit a patch. Personally though, I would go with the arch-ish way of prefixing a list of items.... MODULES=(a b !c) DAEMONS=(a @b c) depends=(a b ~c ~d) I'm just making it up though. Like I said, I have other priorities...
2006/10/12, Aaron Griffin <aaronmgriffin@gmail.com>:
At this point something like this is a low priority. If you really want a feature like this, feel free to submit a patch.
Of course, this is just an idea for far future. :-) I'm not sure I'm a good C programmer. I only started to learn Pacman's v3 internals recently. But if I will have enought time and skill I'll try to make a patch for this feature.
Personally though, I would go with the arch-ish way of prefixing a list of items.... MODULES=(a b !c) DAEMONS=(a @b c) depends=(a b ~c ~d)
Nice idea too, it lacks descriptions of each optional dependency, but is buch simpler. -- Roman Kyrylych (Роман Кирилич)
On 18:03 Thu 12 Oct , Roman Kyrylych wrote:
it may look like this in PKGBUILD: optdepends=(pkgY "allows to use X") optdepends=(pkgZ "adds ABCD feature")
and this in pacman output: Optional dependencies: pkgY - allows to use X pkgZ - adds ABCD feature
[...] What do you think about this?
Yeah, I was thinking to something like that. -- Alessio 'mOLOk' Bolognino
2006. 10. 12, csütörtök keltezéssel 16.45-kor Alessio 'mOLOk' Bolognino ezt írta:
I'm not (yet :) a good C programmer, so it's just a hint, and I don't know if it's easily implementable in pacman, but sometimes there is software that works even without another one, but having this installed let you perform other functions (probably this sentence is bad written, hope you all know what an "optionale dependency" is ;) . As you know there is no way in pacman to handle this kind of dependency except writing a warning message in the .install . I think would be useful to have (at least) an array where to put this type of deps. Am I just a fool?
You think something like debian did no ? There is some "suggested packages" and such foos as i see in newer versions. Those are not installed by default just printed out into screen. And then user knows that some pack maybe can use those 'suggested' packages. But i dont realize too much package which this feature will be usefull. Only few. :( Regards Christian Hamar alias krix Hungary Frugalware Development Team
On 00:05 Fri 13 Oct , Christian Hamar wrote:
[...] You think something like debian did no ?
There is some "suggested packages" and such foos as i see in newer versions. Those are not installed by default just printed out into screen. And then user knows that some pack maybe can use those 'suggested' packages.
But i dont realize too much package which this feature will be usefull. Only few. :(
I saw that debian does a massive use of optional packages, and the description and so is very very (add more "very" here) verbose. I was only thinking at something to replace the messages in .installs I like very much Roman's scheme; anyway...it's just a minor detail, obviously devs have something more important to do now. -- Alessio 'mOLOk' Bolognino
On Fri, 13 Oct 2006 00:05:26 +0200 Christian Hamar <krics@gds.hu> wrote:
But i dont realize too much package which this feature will be usefull. Only few. :(
I agree. For the most part I don't think this would be mega useful and while at times it would, when pacman -Rs foo was run pacman/libalpm would need to go through the added optdepends() and try to establish whether or not they were installed and then would they be uninstalled? How do you propose pacman handles optional depends other than simply alerting the user they exist? Semi-useful feature but I don't know how often it would be used and provided pacman needed to deal with optdepends() at uninstall-time it would definitely slow down the process. Just my 2c... - Cameron
2006/10/13, Cameron Daniel <me@camdaniel.com>:
On Fri, 13 Oct 2006 00:05:26 +0200 Christian Hamar <krics@gds.hu> wrote:
But i dont realize too much package which this feature will be usefull. Only few. :(
I agree. For the most part I don't think this would be mega useful and while at times it would, when pacman -Rs foo was run pacman/libalpm would need to go through the added optdepends() and try to establish whether or not they were installed and then would they be uninstalled? How do you propose pacman handles optional depends other than simply alerting the user they exist?
Semi-useful feature but I don't know how often it would be used and provided pacman needed to deal with optdepends() at uninstall-time it would definitely slow down the process.
If there are not many packages that will use that features then why to worry? ;-) And IMHO it's more logical that optional dependencies will be removed if unneeded too. Anyway this is not super-feature, just small improvement, which will need further testing. Maybe I can make a patch for this. :-/ -- Roman Kyrylych (Роман Кирилич)
participants (6)
-
Aaron Griffin
-
Alessio 'mOLOk' Bolognino
-
Cameron Daniel
-
Christian Hamar
-
Roman Kyrylych
-
VMiklos