You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Rhett Sutphin (JIRA)" <ji...@apache.org> on 2008/08/06 06:30:44 UTC

[jira] Created: (BUILDR-124) unzip(...).from_path does not work correctly without include

unzip(...).from_path does not work correctly without include
------------------------------------------------------------

                 Key: BUILDR-124
                 URL: https://issues.apache.org/jira/browse/BUILDR-124
             Project: Buildr
          Issue Type: Bug
          Components: Core features
    Affects Versions: 1.3.2
         Environment: Tested on OS X 10.5.4, built-in ruby 1.8.6, but will appear on all platforms
            Reporter: Rhett Sutphin


An unzip invocation like this:

unzip("target" => zip).from_path("base/lib")

will not include only the files in "base/lib" in "target."  The files in "base/lib" will be extracted so they are rooted at "target", but all the files in the archive will also be extracted, using their paths as described in the zip file. 

This happens because Unzip::FromPath doesn't filter out the other files.  A workaround is to include an exclude clause which will remove all the other files.  E.g.:

unzip("target" => zip).from_path("base/lib").exclude("base/**/*")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-124) unzip(...).from_path does not work correctly without include

Posted by "Rhett Sutphin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rhett Sutphin updated BUILDR-124:
---------------------------------

    Attachment: BUILDR-124.patch

Fix (with test)

> unzip(...).from_path does not work correctly without include
> ------------------------------------------------------------
>
>                 Key: BUILDR-124
>                 URL: https://issues.apache.org/jira/browse/BUILDR-124
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.3.2
>         Environment: Tested on OS X 10.5.4, built-in ruby 1.8.6, but will appear on all platforms
>            Reporter: Rhett Sutphin
>         Attachments: BUILDR-124.patch
>
>
> An unzip invocation like this:
> unzip("target" => zip).from_path("base/lib")
> will not include only the files in "base/lib" in "target."  The files in "base/lib" will be extracted so they are rooted at "target", but all the files in the archive will also be extracted, using their paths as described in the zip file. 
> This happens because Unzip::FromPath doesn't filter out the other files.  A workaround is to include an exclude clause which will remove all the other files.  E.g.:
> unzip("target" => zip).from_path("base/lib").exclude("base/**/*")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (BUILDR-124) unzip(...).from_path does not work correctly without include

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Assaf Arkin resolved BUILDR-124.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.3

Thanks, added to trunk/head.

> unzip(...).from_path does not work correctly without include
> ------------------------------------------------------------
>
>                 Key: BUILDR-124
>                 URL: https://issues.apache.org/jira/browse/BUILDR-124
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.3.2
>         Environment: Tested on OS X 10.5.4, built-in ruby 1.8.6, but will appear on all platforms
>            Reporter: Rhett Sutphin
>             Fix For: 1.3.3
>
>         Attachments: BUILDR-124.patch
>
>
> An unzip invocation like this:
> unzip("target" => zip).from_path("base/lib")
> will not include only the files in "base/lib" in "target."  The files in "base/lib" will be extracted so they are rooted at "target", but all the files in the archive will also be extracted, using their paths as described in the zip file. 
> This happens because Unzip::FromPath doesn't filter out the other files.  A workaround is to include an exclude clause which will remove all the other files.  E.g.:
> unzip("target" => zip).from_path("base/lib").exclude("base/**/*")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.