Description: | Convert Pacman optional dependencies to real dependencies. |
Latest Version: | 2014.8 |
Source Code: | src/ |
Architecture: |
|
Dependencies: |
|
Arch Repositories: |
|
AUR Page: | makedep |
Arch Forum Thread: | 156508 |
Tags: |
Makedep modifies files in the Pacman local database to add
user-defined dependencies to installed packages. The main purpose is to
convert optional dependencies to true dependencies so that they can be
installed as such and not appear as orphans in the output of
pacman -Qdt
. Usage is not limited to optional dependencies
so any package can be made to depend on any other. This can be used to
tie packages together so that they can be removed with a top-level
package via pacman -Rc...
. It may even be useful for
creating empty packages to act as metapackages.
$ pacman -Qi picard chromaprint
Name : picard
Version : 1.1-1
...
Depends On : python2-pyqt mutagen libofa ffmpeg
Optional Deps : libdiscid: CD lookup
chromaprint: fingerprinting
Name : chromaprint
Version : 0.7-1
...
Required By : None
...
Install Reason : Installed as a dependency for another package
$ makedep picard -a chromaprint
updating picard-1.1-1
$ pacman -Qi picard chromaprint
Name : picard
Version : 1.1-1
...
Depends On : python2-pyqt mutagen libofa ffmpeg chromaprint
Optional Deps : libdiscid: CD lookup
chromaprint: fingerprinting
Name : chromaprint
Version : 0.7-1
...
Required By : picard
...
Install Reason : Installed as a dependency for another package
$ makedep -s
picard
chromaprint
Makedep can of course also remove added packages. See the help message for a full list of options.
When a local package is upgraded, the local database files are
replaced. Makedep can re-add dependencies with makedep -u
.
You could use the following script as a pacman wrapper for sync
operations to automate this (replace /usr/bin/pacman
with
the path to your favorite Pacman wrapper:
#/bin/sh
/usr/bin/pacman -S "$@"
/usr/bin/makedep -u
Save that as e.g. pacman-S
and then use it as
follows:
# System upgrade
pacman-S -yu
# Install package
pacman-S foo
Given that this modifies files in the local database, several precautions have been taken:
Explore the idea of metapackages further. It may be very useful in combination with a repackaging tool to maintain the same package set on different systems.
format
method-a
and -r
)--add-as
and --remove-as
options for
setting installation reasons