Following up on this code review request, I found a problem with the 
original solution.

For a large package download, multiple FileList objects can be used for 
a single installation request. It's also possible for two actions with 
the same content (same hashval) to be downloaded by two different 
FileList objects. With the original solution, the cleanup of the action 
from the first FileList object would delete the file that was needed by 
the action in a later FileList.

To solve this problem without introducing long pathnames, the code has 
been modified to eliminate the "cleanup" members from the actions and to 
depend exclusively on the image.cleanup_downloads method to remove all 
of the temporary files that are downloaded during an install. Now all 
actions that have the same content refer to the same temporary file that 
was downloaded.

The webrev at has been updated:  
http://cr.opensolaris.org/~tmueller/cr-941/

Danek, can you please take a look at this?

Thanks.
Tom

Tom Mueller (pkg-discuss) wrote:
> Please review the changes for:
>
> 941 pkg install fails due to excessive length of filesystem path
>
> http://cr.opensolaris.org/~tmueller/cr-941/
>
> The solution here (thanks Bart) is to store the temporary compressed 
> file under the download directory using the same structure as is used 
> in the repository. Additional actions that reference the same file use 
> filenames with a .0, .1, etc. appended. That fix is in filelist.py.
>
> The other part of the fix is to change the temporary file name used 
> for the uncompressed file. Before, the hashval was appended to the 
> pathname.  Now a tempfile is used instead.
>
> Thanks.
> Tom
>
>
>
>
>

_______________________________________________
pkg-discuss mailing list
pkg-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to