Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] use of sftp/scp transfer protocol in ebuilds.
Date: Thu, 29 Jan 2009 08:29:29
Message-Id: 498168F2.90405@gentoo.org
In Reply to: [gentoo-portage-dev] use of sftp/scp transfer protocol in ebuilds. by Amit Dor-Shifer
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Amit Dor-Shifer wrote:
5 > seems like the URL is passed as-is to the sftp-client, which can't
6 > handle the "sftp://" prefix:
7
8 Then you should use a shell script for FETCHCOMMAND and make the
9 shell script strip the protocol. Something like this should work:
10
11 FETCHCOMMAND="/usr/local/bin/sftp-fetchcommand \
12 "\${DISTDIR}/\${FILE}\" \"\${URI}\""
13
14 #!/bin/bash
15
16 filename=$1
17 uri=$2
18 exec sftp-client "${uri#sftp://}" "$filename"
19
20 - --
21 Thanks,
22 Zac
23 -----BEGIN PGP SIGNATURE-----
24 Version: GnuPG v2.0.9 (GNU/Linux)
25
26 iEYEARECAAYFAkmBaPAACgkQ/ejvha5XGaMsgACdEq8F5sM37KQCXz64Mr8acLH9
27 n34AnjFO8Zp3/0u1rZ/uHvR2OcB0Ffm2
28 =VbmC
29 -----END PGP SIGNATURE-----