not forgetting to run apt-get autoremove after installing empty packages
This commit is contained in:
parent
dcbc17a1c9
commit
41cb135847
2 changed files with 7 additions and 3 deletions
|
@ -51,7 +51,7 @@ Make apt ignore the `Valid-Until` header:
|
||||||
|
|
||||||
Install `equivs`:
|
Install `equivs`:
|
||||||
|
|
||||||
$ apt-get install equivs --no-install-recommends
|
$ apt-get install equivs dctrl-tools --no-install-recommends
|
||||||
|
|
||||||
Bugs
|
Bugs
|
||||||
----
|
----
|
||||||
|
|
|
@ -113,7 +113,7 @@ elif [ "$#" -eq 2 ]; then
|
||||||
| grep sbuild-build-depends \
|
| grep sbuild-build-depends \
|
||||||
| grep -v sbuild-build-depends-core-dummy \
|
| grep -v sbuild-build-depends-core-dummy \
|
||||||
| grep -v sbuild-build-depends-essential-dummy \
|
| grep -v sbuild-build-depends-essential-dummy \
|
||||||
| grep -v sbuild-build-depends-lintian-dummy`
|
| grep -v sbuild-build-depends-lintian-dummy
|
||||||
# output the dependencies of the sbuild dummy package
|
# output the dependencies of the sbuild dummy package
|
||||||
# we use apt to show dependencies because we do not want
|
# we use apt to show dependencies because we do not want
|
||||||
# disjunctions or purely virtual packages to be in the output
|
# disjunctions or purely virtual packages to be in the output
|
||||||
|
@ -153,6 +153,8 @@ elif [ "$#" -eq 2 ]; then
|
||||||
| while read pkgname; do
|
| while read pkgname; do
|
||||||
# create and install a package with same name and version but without dependencies
|
# create and install a package with same name and version but without dependencies
|
||||||
# removing Source: field because of bug#751942
|
# removing Source: field because of bug#751942
|
||||||
|
# we keep the Provides field because otherwise the new package might not
|
||||||
|
# satisfy the dependency
|
||||||
apt-cache show --no-all-versions $pkgname \
|
apt-cache show --no-all-versions $pkgname \
|
||||||
| grep -v "^Pre-Depends:" \
|
| grep -v "^Pre-Depends:" \
|
||||||
| grep -v "^Depends:" \
|
| grep -v "^Depends:" \
|
||||||
|
@ -160,7 +162,6 @@ elif [ "$#" -eq 2 ]; then
|
||||||
| grep -v "^Suggests:" \
|
| grep -v "^Suggests:" \
|
||||||
| grep -v "^Conflicts:" \
|
| grep -v "^Conflicts:" \
|
||||||
| grep -v "^Breaks:" \
|
| grep -v "^Breaks:" \
|
||||||
| grep -v "^Provides:" \
|
|
||||||
| grep -v "^Replaces:" \
|
| grep -v "^Replaces:" \
|
||||||
| grep -v "^Source:" \
|
| grep -v "^Source:" \
|
||||||
| equivs-build -
|
| equivs-build -
|
||||||
|
@ -168,6 +169,9 @@ elif [ "$#" -eq 2 ]; then
|
||||||
dpkg -i ${pkgname}_*.deb
|
dpkg -i ${pkgname}_*.deb
|
||||||
rm ${pkgname}_*.deb
|
rm ${pkgname}_*.deb
|
||||||
done
|
done
|
||||||
|
# now that all fake packages are installed we need to
|
||||||
|
# remove all those dependencies that are not needed anymore
|
||||||
|
apt-get autoremove --assume-yes
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "invalid argument: $1" >&2
|
echo "invalid argument: $1" >&2
|
||||||
|
|
Loading…
Reference in a new issue