Page 1 of 1

VGIT seems to be unable to create directories with dir in the name

Posted: Tue Oct 03, 2023 10:04 am
by pocketprobe
Using VGIT on x86, attempting to clone a repository with a directory with ".dir" in the filename causes a file not found error when the files are being created from the git objects. As per the release notes, and installation procedure all work is being done on an ODS-5 volume.
I've "SET PROC/PARSE=EXTENDED" with no change.
A repository that triggers this issue that could be checked out is busybox ( https://git.busybox.net/busybox/ ) and the directory that causes the failure is visible on this page (hdc.dir). https://git.busybox.net/busybox/tree/qe ... ch_testing

The result of the attempted clone looks like this.

Code: Select all

Bad news:
 could not open 'busybox/qemu_multiarch_testing/hdc.dir/build' for writing: no such file or directory [2]

Re: VGIT seems to be unable to create directories with dir in the name

Posted: Wed Oct 04, 2023 4:52 am
by imiller
not surprising this causes a problem as filenames ending .DIR are reserved for directories.
presumably this directory would be called hdc.dir.dir so this could be a bug is the extended file parsing where it is not just checking for .dir at the end of the filename,

I checked and on an ODS5 disk with extended parsing enabled then a directory DIR can't be created.

Re: VGIT seems to be unable to create directories with dir in the name

Posted: Wed Oct 04, 2023 5:34 am
by joukj
some questions:
what is the contents after failure of [.busybox.qemu_multiarch_testing]
in particular does it contain the file hdc^.dir.DIR

if the file is not present can you create it before extracting from the repository?

Jouk

Re: VGIT seems to be unable to create directories with dir in the name

Posted: Wed Oct 04, 2023 5:43 am
by hb
imiller wrote:
Wed Oct 04, 2023 4:52 am
not surprising this causes a problem as filenames ending .DIR are reserved for directories.
presumably this directory would be called hdc.dir.dir so this could be a bug is the extended file parsing where it is not just checking for .dir at the end of the filename,

I checked and on an ODS5 disk with extended parsing enabled then a directory DIR can't be created.
Yes, the "File type" .DIR is reserved for directories. The "Filename" can have an ending of ".dir" or ".DIR". In DCL the "." needs to be escaped with "^". On an ODS5 disk:

Code: Select all

$ set proc/parse=ext
$ cre/dir [.x.a^.dir]
$ cre/dir [.x.b^.DIR]
$ dir [.x]

Directory WORK20:[USER.x]

a^.dir.DIR;1        b^.DIR.DIR;1        

Total of 2 files.
$ 
That VGIT can't create such a directory looks like a bug in VGIT.

Re: VGIT seems to be unable to create directories with dir in the name

Posted: Wed Oct 04, 2023 6:08 am
by imiller
directory dir can't be created either

$ cre/dir dir
%CREATE-E-DIRNOTCRE, DIR directory file not created
-LIB-F-INVFILSPE, invalid file specification

Re: VGIT seems to be unable to create directories with dir in the name

Posted: Wed Oct 04, 2023 6:31 am
by volkerhalle
imiller wrote:
Wed Oct 04, 2023 6:08 am
$ cre/dir dir
%CREATE-E-DIRNOTCRE, DIR directory file not created
-LIB-F-INVFILSPE, invalid file specification
Ian,

AXPVMS $ cre/dir x
%CREATE-E-DIRNOTCRE, x directory file not created
-LIB-F-INVFILSPE, invalid file specification
AXPVMS $ cre/dir [x]
AXPVMS $ cre/dir [^.dir]/log
%CREATE-I-CREATED, SYS$SYSDEVICE:[^.dir] created

Volker.

Re: VGIT seems to be unable to create directories with dir in the name

Posted: Wed Oct 04, 2023 6:35 am
by imiller
thanks Volker, I'm clearly not awake today.

Re: VGIT seems to be unable to create directories with dir in the name

Posted: Wed Oct 04, 2023 8:16 am
by sms

Code: Select all

>  I checked and on an ODS5 disk with extended parsing enabled then a
> directory DIR can't be created.

   As they said in elementary school, "Show your work."  None of that is
a useful problem description.  "checked"?  "can't"?  As usual, showing
actual actions (commands) with their actual results (behavior, error
messages, ...) can be more helpful than vague descriptions or
interpretations.


> Yes, the "File type" .DIR is reserved for directories. [...]

   Says who?  "used for" and "reserved for" are spelled differently for
a reason.

its $ pipe show proc /parse > FRED.DIR
its $ type FRED.DIR

 4-OCT-2023 07:01:52.64   User: SMS              Process ID:   2021ED12
                          Node: ITS              Process name: "_FTA777:"
 
Parse Style: Extended


   For a good time, compare a DIRE /FULL report for an actual directory
file with one for any old file named "*.DIR;1".  Hint: Look for
"Directory file".


> That VGIT can't create such a directory looks like a bug in VGIT.

   Or, perhaps, in the CRTL?  As usual, many things are possible.

Re: VGIT seems to be unable to create directories with dir in the name

Posted: Wed Oct 04, 2023 11:00 am
by pocketprobe
joukj wrote:
Wed Oct 04, 2023 5:34 am
some questions:
what is the contents after failure of [.busybox.qemu_multiarch_testing]
in particular does it contain the file hdc^.dir.DIR

if the file is not present can you create it before extracting from the repository?

Jouk
The directory is empty as this is where the file creation process stops.

Pre-creating the tree results in vgit claiming the [busybox] directory isn't empty, which imho is good to have clobber protection.

Re: VGIT seems to be unable to create directories with dir in the name

Posted: Sun Jan 28, 2024 7:38 pm
by pocketprobe
This issue still persists after applying X86VMS-VGIT-V0104-1B-1.
I'd like to make a correction, of it being unable to create a directory ending in '.dir'