Menu

#59 cscope-indexer: preserve options in cscope.files

open-rejected
Darryl
5
2006-04-06
2006-04-06
No

from cscope(1):
The -I, -c, -k, -p, -q, and -T options can
also be in the cscope.files
file.
however, cscope-indexer trashes these options.

the attached patches cscope-indexer to preserve these
options.

Discussion

  • Jack Thomasson

    Jack Thomasson - 2006-04-06

    patch cscope-indexer to preserve options

     
  • Hans-Bernhard Broeker

    • status: open --> open-rejected
     
  • Hans-Bernhard Broeker

    Logged In: YES
    user_id=27517

    cscope-indexer doesn't exactly "trash those options" --- it
    rewrites the entire cscope.files from scratch. If someone
    doesn't want the filename list built the way cscope-indexer
    builds it, they shouldn't use it. That set aside,
    cscope-indexer is primarily meant as a part of xcscope, not
    as a general-purpose utility. Changing the way it works
    risks breaking its collaboration with xcscope.

    I'm rejecting this on the above grounds, and for security
    considerations --- the patch, as-is, opens a new /tmp file
    writing hole.

     
  • Jack Thomasson

    Jack Thomasson - 2006-04-06

    patch cscope-indexer to preserve options

     
  • Jack Thomasson

    Jack Thomasson - 2006-04-06

    Logged In: YES
    user_id=83246

    i marked the category specifically as "xcscope interface"
    recognizing that cscope-indexer is a part of xcscope.
    having used cscope for about 13 years and emacs for 20 i
    was mighty glad to see xcscope come around and have only
    used cscope through xcscope since. that said, you fall
    into usage patterns and xcscope makes it too convenient to
    just "Create list and index" after adding that new file.
    unfortunately, the carefully placed options recognized by
    cscope are now gone. so i made the options sticky for
    cscope-indexer very similar to the way your brain would
    treat them if editing cscope.files manually.

    xcscope does not care about cscope.files except as a
    filename. it never opens the file, much less reads it.
    the filename is only passed as an argument to cscope and
    cscope-indexer or used as the target for an emacs buffer.
    you can easily verify this by examining instances of
    "cscope-index-file" (but not "cscope-index-files") in
    xcscope.el.

    as far as the /tmp security concern: the attached patch
    does away with that.

     
  • Hans-Bernhard Broeker

    Logged In: YES
    user_id=27517

    The problem is visible right in that command name: It's
    "Create list and index", not "Update list and index".
    cscope-indexer is for creating the list from scratch, not
    for updating the list with new files after the fact.

    Why should cscope-indexer keep only the options, but not,
    say, all the other files already listed? cscope-indexer
    could use an update mode, yes. But such a mode cannot be
    the default mode of operation, and I think it would have to
    do more than just preserve cscope options.

     

Log in to post a comment.