dir listing not starting with . and ..

John W. Eaton jwe at octave.org
Wed Feb 4 10:20:49 CST 2009


On  4-Feb-2009, Søren Hauberg wrote:

| ons, 04 02 2009 kl. 16:19 +0100, skrev Søren Hauberg:
| > > So, maybe pkg should be fixed?
| > 
| > Yeah, I guess it should. I'll supply a patch some time tonight unless
| > anybody beats me to it...
| 
| I've been thinking a bit about this while out running. 'pkg' calls
| 'untar' to unpack the package and then uses 'readdir' to determine the
| name of whatever directory was in the tar file. Since a package only
| should contain one directory (what would we do if it had more?) we
| always just pick the first directory (skipping "." and "..") that was
| unpacked. So picking element number 3 of the directory listing does make
| sense. So, I don't really think 'pkg' needs to be fixed.

Shouldn't a package named foo-1.0.0.tar.gz unpack into a directory
called foo-1.0.0?  If that's not already part of the definition of a
package, then maybe it should be?  If we have this requirement, then
I think it simplifies things a bit.

jwe



More information about the Bug-octave mailing list