Ticket #84 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

'install' built-in command does not support directories (but pretends to on Posix)

Reported by: ChristianK Assigned to: Gregor
Priority: major Milestone: 0.71
Component: DSSS Version:
Keywords: Cc:

Description

I'd like to use

install dmd/src/phobos $INCLUDE_PREFIX

for installing phobos. While it works for installing and the manifest lists the folder, it will not get cleaned on uninstall. Since the install command does copy the folder recursively, I'd expect that it'd also be removed recursively.

Change History

06/30/07 19:17:37 changed by Gregor

  • status changed from new to closed.
  • resolution set to fixed.

Added in revision 653. Closing.

08/04/07 04:10:02 changed by ChristianK

  • status changed from closed to reopened.
  • resolution deleted.

The change in [653] does only add the removal of empty directories. I use a single install command to install the directory containing the phobos sources. It works since 'install' invokes 'cp -r'. Yet only a single line will get added to the manifest: the directory. During uninstall the directory won't get removed as it is not empty.

I asked for directory lines in a manifest to remove the directory and all its contents, but see that this may be unsafe. So instead the 'install' command, when invoked on a directory, could add all the files and subdirectories of it to the manifest?

08/04/07 04:54:34 changed by ChristianK

I just noticed that 'install' doesn't copy recursively on windows. So maybe it's unintentional?

How do you propose I go about installing the phobos sources to $INCLUDE_PREFIX in a manifest-aware way?

08/04/07 05:25:35 changed by Gregor

  • summary changed from directories installed by 'install' will not be removed on uninstall to 'install' built-in command does not support directories (but pretends to on Posix).

Hrm. Unfortunately, right now there really is no good way to do it like that. What I'd recommend instead, however, is that you (on the fly) create/copy a dsss.conf file into dmd/src/phobos that looks something like this: . type=sourcelibrary

Then, in the top-level dsss.conf: [dmd/src/phobos] type=subdir

That may or may not be more clean.

I'll have to do some mental exercises to get this right. Please stand by.

Oh, and sorry I closed this prematurely, I got it into my mind somehow that this was a dup.

08/04/07 05:26:47 changed by Gregor

Erm, lemme try that again with some proper use of wikisyntax.

What I'd recommend instead, however, is that you (on the fly) create/copy a dsss.conf file into dmd/src/phobos that looks something like this:

[.]
type=sourcelibrary

Then, in the top-level dsss.conf:

[dmd/src/phobos]
type=subdir

08/04/07 13:20:03 changed by ChristianK

Thanks for the help.

  1. dsss will say "WARNING: Section for nonexistant file dmd/src/phobos" and ignore the subdir block if I try to build the dsss.conf in a preinstall. Therefore I do that in a prebuild block now. I hope that will work with the net build & install procedure.
  1. Is there a way to alter the directory the phobos files will be installed into? I tried setting target and name to phobos-dmd, but it still copied the files to include/d/phobos all the same. I could just rename the directory, but is there a dsss way?

08/08/07 00:11:36 changed by Gregor

Hrm, I guess my help wasn't so helpful 8-X

The long story short is that I will be implementing install_dir soon. I had intended to get it in 0.70, but as it turns out 0.70 will be a bit rushed as I'm trying to fix a few bugs.

08/12/07 00:53:02 changed by Gregor

  • milestone set to 0.71.

08/12/07 03:43:07 changed by Gregor

  • status changed from reopened to closed.
  • resolution set to fixed.

Added 'installdir' command in revision 761. Closing.