On Mar 17 10:14:36, Nick Bender wrote: > On Wed, Mar 17, 2010 at 9:44 AM, J.C. Roberts <list-...@designtools.org> > wrote: > > On Wed, 17 Mar 2010 15:02:19 +0100 Jan Stary <h...@stare.cz> wrote: > > > >> Anyway, what really is the purpose of index.txt being there then? > >> To tell the times and sizes? > > > > To break scripts? ;) > > > > To put it bluntly, index.txt seems pointless, or more likely, there is > > some super double secret reason for it to still exist that I simply > > don't know... > > > > My only *GUESS* is, some mirrors are HTTP, but due to brainless > > accountants mindlessly running "security auditing tools," they forbid > > real directory listings, and are configured to only return an existing > > "/index.*" file to the useragent. > > > > Hopefully, someone who actually has a clue (not me) will chime in with > > the real reason why index.txt exists. > > > > jcr > > > > Actually the installer uses it to make a list of file sets to present > to the user. > If it isn't there then no sets are presented. > > >From src/distrib/miniroot/install.sub: > > # Get list of files from the server. > if [[ $_url_type == ftp && -z $ftp_proxy ]] ; then > _file_list=$(ftp $FTPOPTS "$_url_base/") > ftp_error "Login failed." "$_file_list" && return > ftp_error "No such file or directory." "$_file_list" && return > else > # Assumes index file is "index.txt" for http (or proxy) > # We can't use index.html since the format is server-dependent > _file_list=$(ftp $FTPOPTS -o - "$_url_base/index.txt" | \ > sed -e 's/^.* //' | sed -e 's/ > //') > fi >
In fact, the above just gets the content of index.txt and applies the 's/^.* //' smartness, thus eliminating exactly the difference between 'ls' and 'ls -l'. The installer does further work with this list: # Initialize _sets to the list of sets found in _src, and initialize # _get_sets to the intersection of _sets and DEFAULTSETS. (Indeed, I have never seen the installer present me with 'install.iso' or 'index.txt', which _are_ listed in index.txt too.) It still looks like index.txt is just a list of files that are there. Is there any reason to have this information in the 'ls' or 'ls -l' specifically? (It has changed back and forth in the last month.)