[pacman-dev] [PATCH] Use "--mime" instead of file's "-i" parameter, to increase portability

Xavier shiningxc at gmail.com
Mon May 26 07:04:02 EDT 2008

On Mon, May 26, 2008 at 12:47 PM, Sebastian Nowicki <sebnow at gmail.com> wrote:
> On 26/05/2008, at 2:38 PM, Xavier wrote:
>> I was fine with this change because it thought it was needed for every
>> BSD platform, but seeing it is just a mac osx change almost makes me
>> want to reconsider.
> I thought it was a more worthwhile patch as well.
>> And if you just use COMMAND_MODE=legacy to restore the normal
>> interface,
>> this patch is no longer needed?
> Yes, it works:
>> > COMMAND_MODE=legacy file -bziL libfetch-
>> application/x-tar (application/x-bzip2)
> Some change to the code would still be required though, like setting
> the environment variable. I don't think it would be very elegant to
> require the user to set the environment variable.

Well maybe I would prefer this solution, adding this somewhere in makepkg :
export COMMAND_MODE=legacy
Can you confirm it works that way too?

I think it would also be safer. For instance, you forgot the second file call.
But also in the future if these file commands are modified or new ones
are added, it would be better to just have the above export. Though I
suppose this env var is only used by macos and would have no influence
on other systems, right?
So as always, some testing would be appreciated before we put this in makepkg :)

More information about the pacman-dev mailing list