uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thilo Goetz <twgo...@gmx.de>
Subject Re: Repackaging an unpackaged pear file
Date Fri, 27 Apr 2012 15:02:53 GMT
On 27/04/12 00:52, Mike O'Leary wrote:
> Mike O'Learyy <tmoleary@...> writes:
> 
>>
>> Thilo Goetz <twgoetz@...> writes:
>>
>>>
>>> On 26/04/12 18:10, Marshall Schor wrote:
>>>> Thanks Thilo.
>>>>
>>>> Could you unzip the pear with an unzipper, and do the change to fix the
>>>> file path and then zip it back up again?  That way the variable
>>>> replacement stuff wouldn't run.
>>>>
>>>> -Marshall
>>>>
>>>
>>> Yes but you need the original pear to do that.  If somebody
>>> installed the pear, made modifications and then just zipped
>>> it up, it wouldn't work.  On the other hand, a pear that was
>>> just unzipped, not installed, will not run.  It was my
>>> understanding that the original poster did not in fact have
>>> the original pear file.
>>>
>>> So what you do, and I suspect that is what Jens also does,
>>> is install the pear, run it, make modifications, and then
>>> migrate your changes from the installed pear into the zip
>>> file.  That works, but it's not exactly a smooth process.
>>>
>>> --Thilo
>>>
>>>
>>
>> I do have the original pear file. Would it work to do the following steps:
>> 1. Change the pear file extension from .pear to .zip.
>> 2. Unzip the archive.
>> 3. Change the pathnames in the file from absolute to the correct relative 
>> pathnames.
>> 4. Rezip the unzipped directory structure.
>> 5. Change the extension back to .pear.
>>
>> If that works, then I can easily do it. I didn't realize that .pear files used 
>> compression that is compatible with that used for .zip files.
>> Thanks,
>> Mike
>>
>>
> 
> I guess there must be more to it. When I tried using WinZip and whatever similar 
> capability is built into Windows 7 to expand a pear file, change the pathnames 
> and rezip it, the archive that was produced was slightly larger than the 
> original, and when I tried to install it, I got an IOException with the message 
> "installation descriptor not found". I didn't change anything other than the 
> pathnames in one file, so the installation descriptor was still in the right 
> place. I assume it couldn't find the installation descriptor because it didn't 
> recognize the format of the compressed file. What would be a good tool for 
> expanding and compressing pear files (without interpreting their contents)?
> Thanks,
> Mike
> 
> 

Mike,

a pear file is nothing but a zip file with a specific
structure and certain files.  If you have a pear file
with absolute paths in it, that sounds like a contradiction
to me.  I would go back to the source and ask them to
give you a properly packaged pear, with no absolute paths.

If that is not possible, your only option is to dive into
the pear documentation and try to reconstruct a proper
pear from what you have (which may not be that difficult).

--Thilo


Mime
View raw message