[pkg-remote-commits] [xrdp] 01/01: Determine APT mirror automatically.

Dominik George natureshadow-guest at moszumanska.debian.org
Fri Dec 15 18:08:54 UTC 2017


This is an automated email from the git hooks/post-receive script.

natureshadow-guest pushed a commit to branch master
in repository xrdp.

commit d3bdc3f1268d8dcbaff155e213f1e37e9948c17e
Author: Dominik George <nik at naturalnet.de>
Date:   Fri Dec 15 19:08:47 2017 +0100

    Determine APT mirror automatically.
---
 debian/xrdp-build-pulse-modules | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/debian/xrdp-build-pulse-modules b/debian/xrdp-build-pulse-modules
index d2fe76f..d417b61 100755
--- a/debian/xrdp-build-pulse-modules
+++ b/debian/xrdp-build-pulse-modules
@@ -22,8 +22,13 @@ tmp=$(mktemp -d); cd "$tmp"
 pulseaudio_version=$(dpkg-query -W -f='${source:Version}' pulseaudio)
 pulseaudio_upstream_version=$(dpkg-query -W -f='${source:Upstream-Version}' pulseaudio)
 
-# FIXME determine automagically
-mirror="http://ftp.debian.org/debian/"
+# Determine mirror
+if test -x /usr/bin/apt ; then
+	mirror=$(apt show "pulseaudio=$pulseaudio_version" 2>/dev/null | awk '/^APT-Sources: / { print $2; exit }')
+fi
+if test "x$mirror" = x; then
+	mirror="http://ftp.debian.org/debian/"
+fi
 
 # Download source packages
 dget "${mirror}pool/main/p/pulseaudio/pulseaudio_${pulseaudio_version}.dsc"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-remote/xrdp.git



More information about the pkg-remote-commits mailing list