smart query --requires= versus apt-cache rdepends
Gustavo Niemeyer
gustavo at niemeyer.net
Fri May 16 14:20:01 PDT 2008
Hello Pascal,
> while trying out the smart package manager, i noticed that the result of the
> following commands differs on my Ubuntu 8.04 system ("Benötigt" is german for
> requires):
Yes, the result is different because they don't have the same semantics.
The --requires option of the query subcommand takes the description of
a *provided relation*, not a package name like APT. It answers the
question: "Supposing that something provides DEPENDENCY, who would
require it?". This means that it takes version information too: you
can do something like "--requires name=1.0", and this would match if
some package requires "name >= 0.9", for instance.
What you want is also supported by Smart though. Check it out:
$ smart query --show-provides --show-requiredby smartpm-core
(...)
smartpm-core_0.52-2
Provides:
smartpm-core = 0.52-2
Required By:
smartpm_0.52-2 (smartpm-core = 0.52-2)
kpackage-kde4_4:4.0.3-0ubuntu2 (smartpm-core = 0.52-2)
smartpm-core_0.52-hardy1-landscape9
Provides:
smartpm-core = 0.52-hardy1-landscape9
Required By:
smartpm_0.52-hardy1-landscape9 (smartpm-core = 0.52-hardy1-landscape9)
landscape-client_1.0.6-hardy1-landscape1 (smartpm-core =
0.52-hardy1-landscape9)
kpackage-kde4_4:4.0.3-0ubuntu2 (smartpm-core = 0.52-hardy1-landscape9)
> By the way, it is a little bit confusing, that "--requires=DEP" means the
> opposite of "--show-requires DEP", or am I missing something?
I think you're missing some details indeed.
--requires takes an argument, and limits the shown packages.
--show-requires *doesn't* take arguments, doesn't restrict the package
selection, and simply makes Smart display some additional information
for the shown packages.
--
Gustavo Niemeyer
http://niemeyer.net
More information about the Smart
mailing list