dir listing not showing for a someDirectories

Help
2005-06-06
2013-01-02
  • Nasar Sherieff

    Nasar Sherieff - 2005-06-06

    Hi,

    I configured lxr to browse linux2.4.20 kernel. I can
    able to browse all directories except fs and mm
    directory of the kernel tree.  When i click fs or mm
    directory the page will be at the same level(the front
    page). Please help me to resolve this.

    I'm not getting any error message in apache2 logs.

    My lxr.conf:

    # -*- mode: perl -*-
    # Configuration file
    #
    (
            {

                    # Global configuration

                    # Path to glimpse executables.
                    # Define this OR the swish-e variable depending which search engine you want to use.
                    'glimpsebin'   => '/usr/local/bin/glimpse',
                    'glimpseindex' => '/usr/local/bin/glimpseindex',

                    # Location of SWISH-E binary
                    #'swishbin' => '/usr/local/bin/swish-e',

                    # Path to Exuberant Ctags executable
                    'ectagsbin' => '/usr/bin/ctags',

                    # Place where lxr can write temporary files
                    'tmpdir' => '/tmp',

                    # Location of the Generic.pm config file
                    #'genericconf' => '/usr/local/lxr/lib/LXR/Lang/generic.conf',
                    'genericconf' => '/usr/lib/perl5/site_perl/LXR/Lang/generic.conf',

                    # Location of the ectags.conf file
                    #'ectagsconf' => '/usr/local/lxr/lib/LXR/Lang/ectags.conf',
                    'ectagsconf' => '/usr/lib/perl5/site_perl/LXR/Lang/ectags.conf',

                    # Paths for CVS module
                    #'cvspath' => '/bin:/usr/local/bin:/usr/bin:/usr/sbin',

            },

            {

                    # Configuration for http://192.168.1.3/lxr.
                    # baseurl is used to select configuration block.

                    'baseurl' => 'http://127.0.0.1/lxr',    # Put your URL here
                         # baseurl_aliases allows other URLs to be used to reach the site
                         # comment this out if you do not want any aliases
                    'baseurl_aliases' => [ 'http://localhost/lxr', 'http://nasar.picorp.com/lxr' ],
                    'virtroot'        => '/lxr',                   # The bit after the / above

                    'variables' => {

                            # Define typed variable "v".  This is the list of versions to index.
                            'v' => {
                                    'name' => 'Version',

                                    # This can come from a file, a function or be explicitly
                                    # ennumerated.
                                    # From a file:
                                    'range' => [ readfile('/usr/local/kernelsrc/versions') ],

                                    # Explicitly:
                                    # 'range' => [qw(v1 v2 v3.1 v4 experimental)],
                                    # If files within a tree can have different versions,
                                    # e.g in a CVS tree, 'range' can be specified as a
                                    # function to call for each file:
                                    #'range'   => sub { return
                                    #                       ($files->allreleases($LXR::Common::pathname),
                                    #                        $files->allrevisions($LXR::Common::pathname))
                                    #                       }, # deferred function call.

                                    # The default version to display
                                    'default' => 'linux-2.4.20'
                            },

                            # Define typed variable "a".  First value is default.
                            'a' => {
                                    'name'  => 'Architecture',
                                    'range' => [qw(i386 alpha arm m68k mips ppc sparc sparc64)]
                            },
                    },

                    # These do funky things to paths in the system - you probably don't need them.
                    'maps' => {
                            '/include/asm[^\/]*/' => '/include/asm-$a/',
                            '/arch/[^\/]+/'       => '/arch/$a/',
                    },

                    # Templates used for headers and footers
                    'htmlhead'       => 'html-head.html',
                    'htmltail'       => 'html-tail.html',
                    'htmldir'        => 'html-dir.html',
                    'htmlident'      => 'html-ident.html',
                    'htmlident_refs' => 'html-ident-refs.html',
                    'htmlfind'       => 'html-find.html',
                    'htmlsearch'     => 'html-search-glimpse.html',

                    'sourcehead'    => 'html-head.html',
                    'sourcedirhead' => 'html-head.html',
                    'stylesheet'    => 'lxr.css',

                    # sourceroot - where to get the source files from

                    # For ordinary directories, this specifies a directory which has each version as a
                    # subdirectory e.g.
                    #  indexed-src/version1/...
                    #  indexed-src/version2/...
                    # The names of the version directories must match the values for the Version
                    # variable above.
                    'sourceroot' => '/usr/local/kernelsrc',

                    # Alternatively, this can specify a CVS repository by setting the value to "cvs:"
                    # followed by the path to the repository.  Note this must be file accessible - remote
                    # server access does NOT work.
                    #     'sourceroot'      => 'cvs:/hom/karsk/a/CVSROOT/linux',

                    # The name to display for this source tree
                    'sourcerootname' => 'Linux',

                    # The DBI identifier for the database to use
                    # For mysql, the format is dbi:mysql:dbname=<name>
                    # for Postgres, it is dbi:Pg:dbname=<name>
                    # for Oracle, it is dbi:Oracle:host=localhost;sid=DEVMMS;port=1521
                    'dbname' => 'dbi:mysql:dbname=lxr',

                    # If you need to specify the username or password for the database connection,
                    # uncomment the following two lines
                    #  'dbpass'             => 'foo',
                    #  'dbuser'             => 'lxr',

                    # If you need multiple lxr configurations in one database, set different table
                    # prefixes for them.
                    #  'dbprefix' => 'lxr_',

                    # For using glimpse, the directory to store the .glimpse files in is required
                    'glimpsedir' => '/usr/local/kernelsrc',

                    # Location of swish-e index database files if using swish-e
                    #'swishdir' => '/a/directory/here/',

                    # where to look for include files inside the sourcetree.  This is used to hyperlink
                    # to included files.
                    'incprefix' => [ '/include', '/include/linux' ],

                    # Which extensions to treat as images when browsing.  If a fileis an image,
                    # it is displayed.
                    'graphicfile' => '(?i)\.(gif|jpg|jpeg|pjpg|pjpeg|xbm|png)$',#'

                    # How to map files to languages
                    # Note that the string for the key and the first entry in the
                    # array MUST match
                    'filetype' => {

                            # Format is
                            # Language name, filepatten regexp, module to invoke,
                            # (optional )tabwidth
                            # Note that to have another language supported by Generic.pm,
                            # you must ensure that:
                            # a) exuberant ctags supports it
                            # b) generic.conf is updated to specify information about the language
                            # c) the name of the language given here matches the entry in generic.conf
                            'C' => [
                                    'C', '\.c$|\.pc$'    #'
                                    , 'LXR::Lang::Generic', '8'
                            ],
                            'C++' => [
                                    'C++',
                                    '\.C$|((?i)\.c\+\+$|\.cc$|\.cpp$|\.cxx$|\.h$|\.hh$|\.hpp$|\.hxx$|\.h\+\+$)'    #'
                                    , 'LXR::Lang::Generic', '8'
                            ],

                            # Some languages are commented out until the relevant entries in generic.conf are made
                            # The list here is the set supported by ctags 5.0.1
                            # 'Beta'    => [ 'Beta',   '(?i)\.bet$', 'LXR::Lang::Generic' ],
                            # 'Eiffel'  => [ 'Eiffel', '(?i)\.e$',   'LXR::Lang::Generic' ],
                            # 'Fortran' =>
                            #   [ 'Fortran', '(?i)\.f$|\.for$|\.ftn$|\.f77$|\.f90$|\.f95$', 'LXR::Lang::Generic' ],
                            'Cobol' => [ 'Cobol',  '(?i)\.cob$', 'LXR::Lang::Cobol'],
                            'Java' => [ 'Java', '(?i)\.java$', 'LXR::Lang::Java', '4' ],

                            # 'Lisp' => [
                            #       'Lisp', '(?i)\.cl$|\.clisp$|\.el$|\.l$|\.lisp$|\.lsp$|\.ml$', 'LXR::Lang::Generic'
                            # ],

                            # No tabwidth specified here as an example
                            'Make' => [ 'Make', '(?i)\.mak$|(?i)\.mk$|makefile*', 'LXR::Lang::Generic' ],

                            # 'Pascal' => [ 'Pascal', '(?i)\.p$|\.pas$',    'LXR::Lang::Generic' ],
                            'Perl'   => [ 'Perl',   '(?i)\.pl$|\.pm$|\.perl$',     'LXR::Lang::Generic', '4' ],
                            'php'    => [ 'php',    '(?i)\.php$|\.php3$|\.phtml$', 'LXR::Lang::Generic', '2' ],
                            'Python' => [ 'Python', '(?i)\.py$|\.python$',         'LXR::Lang::Generic', '4' ],

                            # 'rexx'   => [ 'rexx',   '(?i)\.cmd$|\.rexx$|\.rx$',    'LXR::Lang::Generic' ],
                            # 'ruby'   => [ 'ruby',   '(?i)\.rb$',    'LXR::Lang::Generic' ],
                            # 'scheme' => [ 'scheme', '(?i)\.sch$|\.scheme$|\.scm$|\.sm$', 'LXR::Lang::Generic' ],
                            'shell' => [ 'shell', '(?i)\.sh$|\.bsh$|\.bash$|\.ksh$|\.zsh$', 'LXR::Lang::Generic' ],

                            # 's-Lang' => [ 's-Lang', '(?i)\.sl$',                'LXR::Lang::Generic' ],
                            'SQL' => [ 'SQL', '(?i)\.sql$|\.pks$|\.pkb$',    'LXR::Lang::Generic' ],
                            'VB'  => [ 'VB',  '(?i)\.bas$|\.cls$|\.ctl$|\.frm$|\.vbs$', 'LXR::Lang::Generic' ],
                            #'tcl' => [ 'tcl', '(?i)\.tcl$|\.wish$',     'LXR::Lang::Generic' ],
                    },

                    # Maps interpreter names to languages.  The format is:
                    #  regexp => langname
                    #   regexp is matched against the part after #! on the first line of a file
                    #   langname must match one of the keys in filetype above.
                    #
                    # This mapping is only used if the filename doesn't match a pattern above, so
                    # a shell script called shell.c will be recognised as a C file,not a shell file.

                    'interpreters' => {
                            'perl'   => 'Perl',
                            'bash'   => 'shell',
                            'csh'    => 'shell',
                            'python' => 'Python',
                            'ksh'    => 'shell',
                            'zsh'    => 'shell',
                            'sh'     => 'shell',
                            'ksh'    => 'shell',
                    },

                    # a link of the form (prefix)($filepath)(postfix) is generated when viewing a file
                    #   example for cvsweb:
                    #'cvswebprefix' => 'http://cvs.myhost.com/cgi-bin/cvsweb.cgi',
                    #'cvswebpostfix' => '?cvsroot=rootname',
                    #   example for viewcvs:
                    #'cvswebprefix' => 'http://cvs.myhost.com/cgi-bin/viewcvs.cgi/myroot',
                    #'cvswebpostfix' => '',

                    # choose to ignore certain directories
                    'ignoredirs' => ['CVSROOT'],    # 'CVS' dir is always ignored
            }
      )

     
    • gd-smith

      gd-smith - 2005-06-09

      I am possibly seeing the same thing. I am running 0.9.4 with glimpse, postgresql and cgi (no mod_perl). I am not looking at linux kernel with this but a different code tree. What I see is that some directories do not list their files but instead I see instead the contents of the source root. Not all directories have the problem. I see nothing unique about the ones that do this. When a bad directory displays, it always shows the proper path in the address bar and not the source root path. Searches seem to work but still will not display the the file contents if in "bad" directory. It is not random (the bad directories are constantly bad and good always good). Any one know what the problem is?  Did not see this with 0.9.3 but used mysql there.

       
    • Don McCasland

      Don McCasland - 2005-06-17

      Well, I've got the same problem.  And there _is_ a discernable pattern in my version.  Directory names at the top of the tree with two or fewer letters in the name.  I have a directory at the top level named 'mk/'  I moved directory to 'foomk/' and reindexed..  I can navigate into foomk/ but not into mk/.

      Now, keeping logs from the genxref and looking into tables shows no difference in how mk/ and foomk/ are being indexed.  I expect this has something to do with how 'source' parses the path after the /.

       
    • Miao ZhiCheng

      Miao ZhiCheng - 2005-07-14

      I think its a bug, this patch will solve tow problem:
      1.the directories named with two letters can not be shown.
      2.filename or directory name that contains dashes can not be shown.

      lxr-0.9.4/lib/LXR/Common.pm
              if(defined $path) {
                      # First suppress anything after a dodgy
      character
      -             $path =~ s!(^[\w_+-,.%^/]+).*!$1!;
      +              $path =~ s!(^[\w_+\-,.%^/]+).*!$1!;
                      # Clean out /../
      -               while ($path =~ m!/../!) {
      +               while ($path =~ m!/\.\./!) {
                              $path = s!/\.\./!/!g;
                      }
              }

       
      • Javier

        Javier - 2005-07-14

        I had noticed that directories that were 2 characters long were not displaying but hadn't had a chance to debug it (with other work getting in the way).

        After applying your patch, I can now list the directories that were 2 characters long that I couldn't before. 

        Thanks!!

        -Javier

         
    • Don McCasland

      Don McCasland - 2005-07-14

      YAAAAAAAAAAY!  Thank you!  This is actually the second company in which I've run into this problem, and both times I didn't have time to go figure out the problem since the older versions of lxr did what we needed in a basic sort of way.

      Thank you thank you thank you!

       
    • Zmeyt

      Zmeyt - 2005-09-26

      Heh.. I have lxr 0.9.4., and source of 2.4.18. and 2.4.31 linux on CVS. I can't see  linux/drivers/net ,   but if i select( by typing in address) some subdirs (linux/drivers/net/fc) i can see them..

      In apache error-log i see:
      [Mon Sep 26 17:25:11 2005] [error] [client 10.0.0.52] (20507)The timeout specified has expired: ap_content_length_filter: apr_bucket_read() failed, referer: http://wwwxxx/lxr/source/drivers/ 

       

Log in to post a comment.