Changing package file extension

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Changing package file extension

Søren Hauberg
Hi,
  Every once in a while (like just a second ago), we get users that
can't figure out how to install packages. Basically, they start out by
extracting the file. I'm guessing they do this because either they
always do that to .tar.gz, or because their browser suggest that they do
this during download. After they've extracted the package, they either
have a .tar file or a directory, and they can't install that with 'pkg'.
  So, perhaps it would be a good idea to change the file extension of
packages? I mean, a file should be named

  image-1.0.6.octpkg

(or something similar) instead of

  image-1.0.6.tar.gz

Any thoughts?
Søren

Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

Thomas Treichl
Søren Hauberg schrieb:

> Hi,
>   Every once in a while (like just a second ago), we get users that
> can't figure out how to install packages. Basically, they start out by
> extracting the file. I'm guessing they do this because either they
> always do that to .tar.gz, or because their browser suggest that they do
> this during download. After they've extracted the package, they either
> have a .tar file or a directory, and they can't install that with 'pkg'.
>   So, perhaps it would be a good idea to change the file extension of
> packages? I mean, a file should be named
>
>   image-1.0.6.octpkg
>
> (or something similar) instead of
>
>   image-1.0.6.tar.gz
>
> Any thoughts?

What about keeping *.3 characters and say eg.
   image-1.0.6.opf
for 'Octave Package Format'? Just a quick thought.

   Thomas

Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

Bill Denney-5
Thomas Treichl wrote:

> Søren Hauberg schrieb:
>> Hi,
>>   Every once in a while (like just a second ago), we get users that
>> can't figure out how to install packages. Basically, they start out by
>> extracting the file. I'm guessing they do this because either they
>> always do that to .tar.gz, or because their browser suggest that they do
>> this during download. After they've extracted the package, they either
>> have a .tar file or a directory, and they can't install that with 'pkg'.
>>   So, perhaps it would be a good idea to change the file extension of
>> packages? I mean, a file should be named
>>
>>   image-1.0.6.octpkg
>>
>> (or something similar) instead of
>>
>>   image-1.0.6.tar.gz
>>
>> Any thoughts?
>
> What about keeping *.3 characters and say eg.
>   image-1.0.6.opf
> for 'Octave Package Format'? Just a quick thought.

Hi Thomas,

First, I don't have an opinion about giving a new extension in general.
Second...

The only system that I can think of that would require 3 characters is
DOS (not even Windows).  While .octpkg is not immediately obvious to
people who don't know about octave they could guess that it's a package
of something.  Also, almost every TLA (three letter acronym) is already
taken.  In this case, opf is already taken by a couple of different
image formats, genetic data, and amusingly enough "open package format"
for ebooks (http://filext.com/file-extension/OPF and
http://www.openebook.org/2007/opf/OPF_2.0_final_spec.html).

I realize that the above comes off strong, and I don't mean for it to be
quite as harsh as it comes out, but I just don't think that we should
limit ourselves to file name restrictions that were only required on an
(almost) obsolete operating system that Octave doesn't even support.

Have a good day,

Bill
Reply | Threaded
Open this post in threaded view
|

Changing package file extension

John W. Eaton
Administrator
In reply to this post by Søren Hauberg
On  2-Nov-2008, Søren Hauberg wrote:

| Hi,
|   Every once in a while (like just a second ago), we get users that
| can't figure out how to install packages. Basically, they start out by
| extracting the file. I'm guessing they do this because either they
| always do that to .tar.gz, or because their browser suggest that they do
| this during download. After they've extracted the package, they either
| have a .tar file or a directory, and they can't install that with 'pkg'.
|   So, perhaps it would be a good idea to change the file extension of
| packages? I mean, a file should be named
|
|   image-1.0.6.octpkg
|
| (or something similar) instead of
|
|   image-1.0.6.tar.gz
|
| Any thoughts?

I don't have any objection to a change like this if it helps to
eliminate confusion.

jwe

Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

Søren Hauberg
tor, 22 01 2009 kl. 12:27 -0500, skrev John W. Eaton:

> On  2-Nov-2008, Søren Hauberg wrote:
>
> | Hi,
> |   Every once in a while (like just a second ago), we get users that
> | can't figure out how to install packages. Basically, they start out by
> | extracting the file. I'm guessing they do this because either they
> | always do that to .tar.gz, or because their browser suggest that they do
> | this during download. After they've extracted the package, they either
> | have a .tar file or a directory, and they can't install that with 'pkg'.
> |   So, perhaps it would be a good idea to change the file extension of
> | packages? I mean, a file should be named
> |
> |   image-1.0.6.octpkg
> |
> | (or something similar) instead of
> |
> |   image-1.0.6.tar.gz
> |
> | Any thoughts?
>
> I don't have any objection to a change like this if it helps to
> eliminate confusion.

I think it would eliminate some confusions, but would it introduce new
ones? Would it be a problem for people who upload package files to
internet servers, that the file extension is unknown to the server?

Anyway, if we make such a change what would be a suitable extension?
'.octpkg' ?

Also, it might be worth mentioning that R seems to use '.tar.gz'.

Søren

Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

John W. Eaton
Administrator
On 22-Jan-2009, Søren Hauberg wrote:

| I think it would eliminate some confusions, but would it introduce new
| ones? Would it be a problem for people who upload package files to
| internet servers, that the file extension is unknown to the server?
|
| Anyway, if we make such a change what would be a suitable extension?
| '.octpkg' ?
|
| Also, it might be worth mentioning that R seems to use '.tar.gz'.

OK, then unless someone feels strongly enough about it to push for the
change, I'd rather leave it alone.

jwe

Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

Jordi Gutiérrez Hermoso
In reply to this post by Søren Hauberg
2008/11/2 Søren Hauberg <[hidden email]>:

>  image-1.0.6.octpkg
>
> (or something similar) instead of
>
>  image-1.0.6.tar.gz

I think this is really good idea. I support filename extensions that
are descriptive of the purpose, not necessarily the format. After all,
Debian packages are .deb, not .ar even if they *are* .ar archives, and
Java packages, OpenOffice.org documents are .jar and .od* even if they
both are just .zip archives, and configuration files are .conf, not
.txt, etc.

- Jordi G. H.

Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

John W. Eaton
Administrator
On 23-Jan-2009, Jordi Gutiérrez Hermoso wrote:

| 2008/11/2 Søren Hauberg <[hidden email]>:
|
| >  image-1.0.6.octpkg
| >
| > (or something similar) instead of
| >
| >  image-1.0.6.tar.gz
|
| I think this is really good idea. I support filename extensions that
| are descriptive of the purpose, not necessarily the format. After all,
| Debian packages are .deb, not .ar even if they *are* .ar archives, and
| Java packages, OpenOffice.org documents are .jar and .od* even if they
| both are just .zip archives, and configuration files are .conf, not
| .txt, etc.

Is anyone willing to do the work to make the change?  Should we
support both the new extension (whatever it is we choose) and the old
tar.gz?

jwe

Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

Jordi Gutiérrez Hermoso
2009/1/27 John W. Eaton <[hidden email]>:
> Is anyone willing to do the work to make the change?  Should we
> support both the new extension (whatever it is we choose) and the old
> tar.gz?

So what exactly needs to be changed? I looked at the pkg.m script, and
the actual extension isn't used anywhere except in the docstrings...
Just change those?

It would be nice if "pkg add <TAB>" would try to autocomplete with
.octpkg extension... does the parser need a modification for this to
happen?

- Jordi G. H.
Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

John W. Eaton
Administrator
On 29-Jan-2009, Jordi Gutiérrez Hermoso wrote:

| 2009/1/27 John W. Eaton <[hidden email]>:
| > Is anyone willing to do the work to make the change?  Should we
| > support both the new extension (whatever it is we choose) and the old
| > tar.gz?
|
| So what exactly needs to be changed? I looked at the pkg.m script, and
| the actual extension isn't used anywhere except in the docstrings...
| Just change those?
|
| It would be nice if "pkg add <TAB>" would try to autocomplete with
| .octpkg extension... does the parser need a modification for this to
| happen?

If the extension is not explicitly used in pkg.m, then I guess it is
just a matter of documentation and changing the names of the Octave
Forge packages.

jwe

Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

Jordi Gutiérrez Hermoso
2009/1/29 John W. Eaton <[hidden email]>:

> On 29-Jan-2009, Jordi Gutiérrez Hermoso wrote:
>
> | 2009/1/27 John W. Eaton <[hidden email]>:
> | > Is anyone willing to do the work to make the change?  Should we
> | > support both the new extension (whatever it is we choose) and the old
> | > tar.gz?
> |
> | So what exactly needs to be changed? I looked at the pkg.m script, and
> | the actual extension isn't used anywhere except in the docstrings...
> | Just change those?
> |
> | It would be nice if "pkg add <TAB>" would try to autocomplete with
> | .octpkg extension... does the parser need a modification for this to
> | happen?
>
> If the extension is not explicitly used in pkg.m, then I guess it is
> just a matter of documentation and changing the names of the Octave
> Forge packages.

Is this really all that has to be done? It feels kinda silly to submit
a diff for something like this. I guess the real change has to be in
the 'Forge website.

- Jordi G. H.

diff -r 4d90d21a9cd9 scripts/pkg/pkg.m
--- a/scripts/pkg/pkg.m Thu Jan 29 11:49:06 2009 +0100
+++ b/scripts/pkg/pkg.m Thu Jan 29 14:01:00 2009 -0600
@@ -26,10 +26,10 @@
 ## @item install
 ## Install named packages.  For example,
 ## @example
-## pkg install image-1.0.0.tar.gz
+## pkg install image-1.0.0.octpkg
 ## @end example
 ## @noindent
-## installs the package found in the file @code{image-1.0.0.tar.gz}.
+## installs the package found in the file @code{image-1.0.0.octpkg}.
 ##
 ## The @var{option} variable can contain options that affect the manner
 ## in which a package is installed. These options can be one or more of
@@ -184,7 +184,7 @@
 ## @code{pkg}. The form of the command to build a binary package is
 ##
 ## @example
-## pkg build builddir image-1.0.0.tar.gz @dots{}
+## pkg build builddir image-1.0.0.octpkg @dots{}
 ## @end example
 ##
 ## @noindent

Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

John W. Eaton
Administrator
On 29-Jan-2009, Jordi Gutiérrez Hermoso wrote:

| Is this really all that has to be done? It feels kinda silly to submit
| a diff for something like this. I guess the real change has to be in
| the 'Forge website.

I think I should wait on applying this patch until we get agreement
from whoever is building packages for Octave Forge that this is the
right thing to do.

Even for simple changes like this, how about submitting an hg
changeset?  That way it is easier for me beucase I don't have to add
your name and a commit message when I import the patch.

jwe

Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

Søren Hauberg
In reply to this post by Jordi Gutiérrez Hermoso
tor, 29 01 2009 kl. 14:05 -0600, skrev Jordi Gutiérrez Hermoso:
> 2009/1/29 John W. Eaton <[hidden email]>:
> > If the extension is not explicitly used in pkg.m, then I guess it is
> > just a matter of documentation and changing the names of the Octave
> > Forge packages.
>
> Is this really all that has to be done? It feels kinda silly to submit
> a diff for something like this. I guess the real change has to be in
> the 'Forge website.

But does it actually work? Have you tried actually installing a package
that has extension .octpkg ? I'd fear that some of the routines for
uncompressing files might need changing.

Also, perhaps the manual needs to be updated to reflect that packages
are files with a .octpkg prefix. I haven't checked though...

Søren

Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

Søren Hauberg
In reply to this post by John W. Eaton
tor, 29 01 2009 kl. 15:10 -0500, skrev John W. Eaton:
> On 29-Jan-2009, Jordi Gutiérrez Hermoso wrote:
>
> | Is this really all that has to be done? It feels kinda silly to submit
> | a diff for something like this. I guess the real change has to be in
> | the 'Forge website.
>
> I think I should wait on applying this patch until we get agreement
> from whoever is building packages for Octave Forge that this is the
> right thing to do.

I guess that's me. I'm a bit overworked at the moment, so I'm neglecting
my Octave-Forge duties, which is a bit embarrassing I guess. From a
practical point of view it's trivial to rename the package files during
building. It might, however, be problematic to upload files with a
non-standard extension to Octave-Forge (I don't know as I haven't
tried).

Søren

Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

David Bateman-2
Søren Hauberg wrote:

> tor, 29 01 2009 kl. 15:10 -0500, skrev John W. Eaton:
>  
>> On 29-Jan-2009, Jordi Gutiérrez Hermoso wrote:
>>
>> | Is this really all that has to be done? It feels kinda silly to submit
>> | a diff for something like this. I guess the real change has to be in
>> | the 'Forge website.
>>
>> I think I should wait on applying this patch until we get agreement
>> from whoever is building packages for Octave Forge that this is the
>> right thing to do.
>>    
>
> I guess that's me. I'm a bit overworked at the moment, so I'm neglecting
> my Octave-Forge duties, which is a bit embarrassing I guess. From a
> practical point of view it's trivial to rename the package files during
> building. It might, however, be problematic to upload files with a
> non-standard extension to Octave-Forge (I don't know as I haven't
> tried).
>
> Søren
>
>
>  
Uploading isn't the issue, its the automatic recognition of what type of
file that is uploaded might cause an issue. I think ReleaseForge should
avoid this problem...

D..

--
David Bateman                                [hidden email]
35 rue Gambetta                              +33 1 46 04 02 18 (Home)
92100 Boulogne-Billancourt FRANCE            +33 6 72 01 06 33 (Mob)

Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

John W. Eaton
Administrator
In reply to this post by Søren Hauberg
On 29-Jan-2009, Søren Hauberg wrote:

| tor, 29 01 2009 kl. 14:05 -0600, skrev Jordi Gutiérrez Hermoso:
| > 2009/1/29 John W. Eaton <[hidden email]>:
| > > If the extension is not explicitly used in pkg.m, then I guess it is
| > > just a matter of documentation and changing the names of the Octave
| > > Forge packages.
| >
| > Is this really all that has to be done? It feels kinda silly to submit
| > a diff for something like this. I guess the real change has to be in
| > the 'Forge website.
|
| But does it actually work? Have you tried actually installing a package
| that has extension .octpkg ? I'd fear that some of the routines for
| uncompressing files might need changing.

I don't think that tar or gzip should care what the extension is, so
both

  tar zxf foo.octpkg

or

  gunzip -c - | tar xf -

should both work.  But yeah, have you tested it?

jwe

Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

John W. Eaton
Administrator
In reply to this post by Søren Hauberg
On 29-Jan-2009, Søren Hauberg wrote:

| I guess that's me. I'm a bit overworked at the moment, so I'm neglecting
| my Octave-Forge duties, which is a bit embarrassing I guess. From a
| practical point of view it's trivial to rename the package files during
| building. It might, however, be problematic to upload files with a
| non-standard extension to Octave-Forge (I don't know as I haven't
| tried).

OK.  Well, I don't see this as an urgent issue.  It was brought up
becuase a small number of people seem to be confused by the tar.gz
extension, and they think they should just unpack the tar.gz file to
install the package.  Well, the people who do that are just not paying
attention, so how much work should we do to cater to the few people
that get this wrong?  Maybe it is not worth the effort.  Maybe we
should wait to see if this question come up a lot more often, before
making the change.

jwe

Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

Jordi Gutiérrez Hermoso
In reply to this post by John W. Eaton
2009/1/29 John W. Eaton <[hidden email]>:

> I don't think that tar or gzip should care what the extension is,

Yeah, tar doesn't care (and if you just pack and unpack with "tar
-xzvf" and "tar -czvf", you can use whatever extension you like).
gunzip cares, but you can override the extension it expects is with
the -S option.

I don't see this as urgent either, but anything that reduces newbie
confusion seems like a good idea to me, especially when it's such a
minor cosmetic change. People complain *so much* when software doesn't
work as expected that I'm starting to think it's easier to change the
software than people's expectations.

- Jordi G. H.
Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

John W. Eaton
Administrator
On 29-Jan-2009, Jordi Gutiérrez Hermoso wrote:

| 2009/1/29 John W. Eaton <[hidden email]>:
|
| > I don't think that tar or gzip should care what the extension is,
|
| Yeah, tar doesn't care (and if you just pack and unpack with "tar
| -xzvf" and "tar -czvf", you can use whatever extension you like).
| gunzip cares, but you can override the extension it expects is with
| the -S option.
|
| I don't see this as urgent either, but anything that reduces newbie
| confusion seems like a good idea to me, especially when it's such a
| minor cosmetic change. People complain *so much* when software doesn't
| work as expected that I'm starting to think it's easier to change the
| software than people's expectations.

Then can you do the work that Søren may be too busy to do?  I don't
think that it is necessary for us to jump to do something just because
one or two people are confused.  Or has this been causing much more
confusion than that?

jwe

Reply | Threaded
Open this post in threaded view
|

Re: Changing package file extension

John W. Eaton
Administrator
In reply to this post by Jordi Gutiérrez Hermoso
On 29-Jan-2009, Jordi Gutiérrez Hermoso wrote:

| gunzip cares, but you can override the extension it expects is with
| the -S option.

Really?  Doing something like

  gunzip -c foo.octpkg | tar tf

seemed to work fine on my system.  Oh, but I see that

  gunzip foo.octpkg

fails.  But do we need to unpack this way, or just use gunzip -c as
part of a pipeline?

jwe

12