Quantcast
Viewing all articles
Browse latest Browse all 2849

General Questions • Re: [Software] How do you find reverse deps with aptitude

From aptitude user's manual - Search term reference
?broken-depType, ~BdepType

Matches packages which have an unfulfilled (“broken”) dependency of the given depType. depType can be “depends”, “predepends”, “recommends”, “suggests”, “breaks”, “conflicts”, or “replaces”.
[...]

?depType(pattern), ~D[depType:]pattern

depType may be any one of the dependency types given in the documentation of ?broken-depType, as well as provides: for instance, ?depends(libpng3) will match any package that depends on libpng3. If the short form (~D) is used and depType is not present, it defaults to depends.

If depType is “provides”, matches packages that provide a package matching pattern (the equivalent of ?provides). Otherwise, matches packages which declare a dependency of type depType upon a package version which matches pattern.
[...]

?reverse-depType(pattern), ~R[depType:]pattern

depType may be either “provides” or one of the dependency types given in the documentation of ?broken-depType. If depType is not present, it defaults to depends.

If depType is “provides”, matches packages whose name is provided by a package version matching pattern. Otherwise, matches packages which a package version matching pattern declares a dependency of type depType upon.

Code:

$> PK="abook"; apt rdepends --no-conflicts --no-breaks --no-replaces --no-enhances "$PK"abookReverse Depends:  Suggests: lbdb  Recommends: mutt-wizard
"Enhances:" are often forgotten, so:

Code:

$> PK="abook"; apt rdepends --no-conflicts --no-breaks --no-replaces --no-enhances "$PK"; apt depends --no-pre-depends --no-depends --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces "$PK"abookReverse Depends:  Suggests: lbdb  Recommends: mutt-wizardabook  Enhances: mutt
Which gives with aptitude:

Code:

$> PK="abook" PK="${PK//./\\.}" PK="${PK//+/\\+}"; aptitude -F "%p" search "?or(?predepends(^${PK}$),?depends(^${PK}$),?recommends(^${PK}$),?suggests(^${PK}$))"lbdb                                                                                                                                                                                          mutt-wizard

Code:

PK="abook" PK="${PK//./\\.}" PK="${PK//+/\\+}"; aptitude -F "%p" search "?or(?predepends(^${PK}$),?depends(^${PK}$),?recommends(^${PK}$),?suggests(^${PK}$),?reverse-enhances(^${PK}$))"lbdb                                                                                                                                                                                          mutt                                                                                                                                                                                          mutt-wizard
The problem with aptitude is that (to my knowledge) you can't display the dependency type.

Statistics: Posted by fabien — 2024-08-26 22:45



Viewing all articles
Browse latest Browse all 2849

Trending Articles