Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 167902 - PORTAGE_BINHOST fails if PASV not allowed
Summary: PORTAGE_BINHOST fails if PASV not allowed
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-21 18:56 UTC by edoceo
Modified: 2013-02-15 21:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description edoceo 2007-02-21 18:56:01 UTC
grep BINHOST /etc/make.conf
PORTAGE_BINHOST="ftp://portage:@c.edoceo.com/"

But my FTP server doesn't allow PASV so then when the Python ftplib issues PASV it chokes and dies :(

Here's the spew:
curo etc # emerge -pvuDN world

These are the packages that would be merged, in order:

Calculating world dependencies  .Fetching binary packages info...
 * No password provided for username 'anonymous'

Traceback (most recent call last):
  File "/usr/bin/emerge", line 5299, in ?
    retval = emerge_main()
  File "/usr/bin/emerge", line 5294, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/bin/emerge", line 4613, in action_build
    mydepgraph = depgraph(settings, trees, myopts, myparams, spinner)
  File "/usr/bin/emerge", line 990, in __init__
    "--getbinpkgonly" in self.myopts)
  File "/usr/lib/portage/pym/portage.py", line 6540, in populate
    self.remotepkgs = getbinpkg.dir_get_metadata(
  File "/usr/lib/portage/pym/getbinpkg.py", line 448, in dir_get_metadata
    filelist = dir_get_list(baseurl, conn)
  File "/usr/lib/portage/pym/getbinpkg.py", line 299, in dir_get_list
    listing = conn.nlst()
  File "/usr/lib/python2.4/ftplib.py", line 448, in nlst
    self.retrlines(cmd, files.append)
  File "/usr/lib/python2.4/ftplib.py", line 396, in retrlines
    conn = self.transfercmd(cmd)
  File "/usr/lib/python2.4/ftplib.py", line 345, in transfercmd
    return self.ntransfercmd(cmd, rest)[0]
  File "/usr/lib/python2.4/ftplib.py", line 321, in ntransfercmd
    host, port = self.makepasv()
  File "/usr/lib/python2.4/ftplib.py", line 299, in makepasv
    host, port = parse227(self.sendcmd('PASV'))
  File "/usr/lib/python2.4/ftplib.py", line 241, in sendcmd
    return self.getresp()
  File "/usr/lib/python2.4/ftplib.py", line 216, in getresp
    raise error_perm, resp
ftplib.error_perm: 500 Unknown command

NOTE:
  host, port = parse227(self.sendcmd('PASV'))

If I enable PASV on my FTP server it's OK.  I would like Portage to work on both passive and non-passive FTP servers.
Comment 1 Michael Studer 2007-03-24 21:56:20 UTC
(In reply to comment #0)
> grep BINHOST /etc/make.conf
> PORTAGE_BINHOST="ftp://portage:@c.edoceo.com/"
> 
> But my FTP server doesn't allow PASV so then when the Python ftplib issues PASV
> it chokes and dies :(
> 
> Here's the spew:
> curo etc # emerge -pvuDN world
> 
> These are the packages that would be merged, in order:
> 
> Calculating world dependencies  .Fetching binary packages info...
>  * No password provided for username 'anonymous'
> 
> Traceback (most recent call last):
>   File "/usr/bin/emerge", line 5299, in ?
>     retval = emerge_main()
>   File "/usr/bin/emerge", line 5294, in emerge_main
>     myopts, myaction, myfiles, spinner)
>   File "/usr/bin/emerge", line 4613, in action_build
>     mydepgraph = depgraph(settings, trees, myopts, myparams, spinner)
>   File "/usr/bin/emerge", line 990, in __init__
>     "--getbinpkgonly" in self.myopts)
>   File "/usr/lib/portage/pym/portage.py", line 6540, in populate
>     self.remotepkgs = getbinpkg.dir_get_metadata(
>   File "/usr/lib/portage/pym/getbinpkg.py", line 448, in dir_get_metadata
>     filelist = dir_get_list(baseurl, conn)
>   File "/usr/lib/portage/pym/getbinpkg.py", line 299, in dir_get_list
>     listing = conn.nlst()
>   File "/usr/lib/python2.4/ftplib.py", line 448, in nlst
>     self.retrlines(cmd, files.append)
>   File "/usr/lib/python2.4/ftplib.py", line 396, in retrlines
>     conn = self.transfercmd(cmd)
>   File "/usr/lib/python2.4/ftplib.py", line 345, in transfercmd
>     return self.ntransfercmd(cmd, rest)[0]
>   File "/usr/lib/python2.4/ftplib.py", line 321, in ntransfercmd
>     host, port = self.makepasv()
>   File "/usr/lib/python2.4/ftplib.py", line 299, in makepasv
>     host, port = parse227(self.sendcmd('PASV'))
>   File "/usr/lib/python2.4/ftplib.py", line 241, in sendcmd
>     return self.getresp()
>   File "/usr/lib/python2.4/ftplib.py", line 216, in getresp
>     raise error_perm, resp
> ftplib.error_perm: 500 Unknown command
> 
> NOTE:
>   host, port = parse227(self.sendcmd('PASV'))
> 
> If I enable PASV on my FTP server it's OK.  I would like Portage to work on
> both passive and non-passive FTP servers.
> 
I also got a very similar error due to a bad file in the ftp server's portage directory.  I used the tail command on the srever's messages file to detect the error when a client tried emerge -gk pkgname.  Then traced it to ut2004 data file size problem.  So I removed that file and everything worked.  It is odd tha t the ut2004 file error would come up when I was emerging an update to gzip.  Hmm.  A nicer error from emerge would be desirable.
Comment 2 Zac Medico gentoo-dev 2013-02-15 21:29:54 UTC
This should be fixed now, since we no longer use ftplib. However, with ftp, you may encounter bug 350139.