file command produces wrong message

Bug #683668 reported by latimerio on 2010-12-01
24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
file (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: file

the file command for a compressed (gzip) file says:
 ... compress'd...
The apostroph in here is completely wrong to me.
It messed up things in my output parser and it should say compressed instead of compress'd as in previous versions of ubuntu.

Robert Roth (evfool) wrote :

Could you please attach a sample file this happens with? I have tried with more compressed types, and each one was compressed as expected. Tried with .zip, .tar.gz, and tried with a gzip zipped manually with gzip.

Changed in file (Ubuntu):
status: New → Incomplete
Robert Roth (evfool) wrote :

I have found it... it happens when trying with compressed data compressed using the compress command found in the ncompress package. Setting to Confirmed.

Changed in file (Ubuntu):
status: Incomplete → Confirmed
tags: added: bitesize string-fix
Robert Roth (evfool) wrote :

Diff for fixing this, changing compress'd to compressed.

Robert Roth (evfool) wrote :

My fix is not the best one. This bug needs a better wording. Archives are described by the file utility as "gzip compressed data", "7-zip compressed data", etc. "compress'd data" stands for an abbreviation of the ugly wording "compress compressed data" (compress being the name of the app used to compress) or "compressed data compressed with compress" :) It could be "LZW compressed data" or "data compressed usin compress". Please suggest a correct wording having the same meaning as the above, and I'll do the patch.

tags: added: patch

Hello Robert,
Thank you for digging into it.
From your wording suggestions I think "'file' command gives wrong type for
data being compressed with 'compress'" describes it best.
Indeed I was trying to process a bunch of files which had been compressed
with 'compress' on HP-UX.
Because I had a large list of those files without the .Z extension I needed
to check which where compressed and which not.
Thus I used something like:
   file $Filename | grep -q "compressed" && { cat $Filename | uncompress ; }
|| cat $Filename

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of
Robert Roth
Sent: Donnerstag, 2. Dezember 2010 23:40
To: <email address hidden>
Subject: [Bug 683668] Re: file command in 10.10 produces wrong message

My fix is not the best one. This bug needs a better wording. Archives are
described by the file utility as "gzip compressed data", "7-zip compressed
data", etc. "compress'd data" stands for an abbreviation of the ugly wording
"compress compressed data" (compress being the name of the app used to
compress) or "compressed data compressed with compress"
:) It could be "LZW compressed data" or "data compressed usin compress".
Please suggest a correct wording having the same meaning as the above, and
I'll do the patch.

** Tags added: patch

--
You received this bug notification because you are a direct subscriber of
the bug.
https://bugs.launchpad.net/bugs/683668

Title:
  file command in 10.10 produces wrong message

Status in "file" package in Ubuntu:
  Confirmed

Bug description:
  Binary package hint: file

in 10.10 the file command for a compressed (gzip) file says:
 ... compress'd...
The apostroph in here is completely wrong to me.
It messed up things in my output parser and it should say compressed
instead of compress'd as in previous versions of ubuntu.

To unsubscribe from this bug, go to:
https://bugs.launchpad.net/ubuntu/+source/file/+bug/683668/+subscribe

@latimerio: the description you have given (data being compressed with 'compress')
1. is in a continuous tense, which is not the best thing (although I'm not a native English speaker), and contains the word compress twice... if we tolerate that, we could say "data compressed with 'compress'"
2. also contains the ' character, so that will still mess up your output parser, I think

@Robert:
So I suggest: the "file" command gives wrong type for data compressed with
"compress"

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of
Robert Roth
Sent: Freitag, 3. Dezember 2010 09:17
To: <email address hidden>
Subject: [Bug 683668] Re: file command in 10.10 produces wrong message

@latimerio: the description you have given (data being compressed with
'compress') 1. is in a continuous tense, which is not the best thing
(although I'm not a native English speaker), and contains the word compress
twice... if we tolerate that, we could say "data compressed with 'compress'"
2. also contains the ' character, so that will still mess up your output
parser, I think

--
You received this bug notification because you are a direct subscriber of
the bug.
https://bugs.launchpad.net/bugs/683668

Title:
  file command in 10.10 produces wrong message

Status in "file" package in Ubuntu:
  Confirmed

Bug description:
  Binary package hint: file

in 10.10 the file command for a compressed (gzip) file says:
 ... compress'd...
The apostroph in here is completely wrong to me.
It messed up things in my output parser and it should say compressed
instead of compress'd as in previous versions of ubuntu.

To unsubscribe from this bug, go to:
https://bugs.launchpad.net/ubuntu/+source/file/+bug/683668/+subscribe

This bug hasn't been touched in a year. is it still a problem?

Changed in file (Ubuntu):
status: Confirmed → Incomplete
Robert Roth (evfool) wrote :

Yes, it still happens. To see it:
sudo apt-get install ncompress
compress FILENAME (any file will do it) -> this will create a FILENAME.Z file
file FILENAME.Z
See the result:FILENAME.Z: compress'd data 16 bits

Changed in file (Ubuntu):
status: Incomplete → Confirmed
Changed in file (Ubuntu):
assignee: nobody → gianluigi (gianluigi-rossi)
status: Confirmed → In Progress
summary: - file command in 10.10 produces wrong message
+ file command produces wrong message
description: updated

Hi!

I have solved the bug, the diff is attached.

There is no typo as the file is compressed using the "compress" tool.
Attached is my patch proposal.

Changed in file (Ubuntu):
assignee: gianluigi (gianluigi-rossi) → SYEDFAYAZ MUJAWAR (syedfayaz28)
Changed in file (Ubuntu):
assignee: SYEDFAYAZ MUJAWAR (syedfayaz28) → nobody
status: In Progress → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers