Skip to content

Install fails to handle directories correctly #1699

Open

Description

@bdbaddog

This issue was originally created at: 2007-07-31 14:23:15.
This issue was reported by: rhl.

rhl said at 2007-07-31 14:23:15

Given the following SConstruct file

env = Environment()
prefix = "./installDir"
Alias("install", env.Install(prefix, "python"))
Alias("install", env.Install(prefix, "lib"))

I can say scons install and my directories (./pythonand ./lib are correctly installed. I see two problems, though:

  1. If I now add a file to e.g. ./lib, a second scons install does nothing
  2. scons -c install fails to uninstall the files.

There are no problems when I explicitly list files, not directories, but the man page states:

Install(dir, source)
env.Install(dir, source)
    Installs one or more source files or directories in a destination directory dir.
    The names of the specified source files or directories remain the same within the destination directory.

so I think that this is supposed to work.

Steven notes:
I see that we added a source_scanner argument to env.Command(), but not to env.Install(). I think what you should be able to do is something like:

    env.Install(prefix, "python", source_scanner=DirScanner)

But we need an enhancement to allow that to happen.

Actually, on further reflection, it might make sense to just add the DirScanner to the Install() builder by default. If you're explicitly specifying a directory tree that you want installed, I can't think of a good reason why you wouldn't want to scan it for changes.

Shell cut-and-paste of problem:

$ scons install
scons: Entering directory `/Users/rhl/LSST/fw-ticket108'
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
Install directory: "python" as "installDir/python"
Install directory: "lib" as "installDir/lib"
scons: done building targets.
$ ls -R installDir
lib     python
 
installDir/lib:
 
installDir/python:
lsst
 
installDir/python/lsst:
$ date  lib/date
$ scons install
scons: Entering directory `/Users/rhl/LSST/fw-ticket108'
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: `install' is up to date.
scons: done building targets.
$ ls -R installDir/lib
$ scons -c install
scons: Entering directory `/Users/rhl/LSST/fw-ticket108'
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Cleaning targets ...
scons: done cleaning targets.
$ ls -R installDir
lib     python
 
installDir/lib:
 
installDir/python:
lsst
 
installDir/python/lsst:

bdbaddog said at 2008-03-17 18:55:54

Checking if still a bug in current svn and then return to triage team.

bdbaddog said at 2008-03-17 19:45:16

changed to research.

garyo said at 2008-03-17 20:21:52

dup of 1752

*** This issue has been marked as a duplicate of 1752 ***

garyo said this issue is a duplicate of #1752 at 2008-03-17 20:21:52.

Activity

  1. added this to the milestone on Jan 2, 2018
  2. mwichmann commented on Nov 15, 2026

    @mwichmann
    Collaborator

    I'm reopening this because it holds more analysis than #1752 - they're still "duplicates", and if/when there's a fix we will close both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions