Sitelet https://github.com/fsprojects/Paket/issues/1472
Skip to content

Paket Pack builds bad pakage when specifying relative target path external to package directory.  #1472

Description

@galaxystar

Paket 2.50.6.0, 3.0.0.40-alpha. Running on Mac.

When I use a target path that is external (and non absolute) to a directory outside of the /packages/group/ directory it results in duplicate files, where the duplicate files are at the wrong path.

I'm using relative paths because I want the install/update for some of my packages to be deployed somewhere other than the packages directory. I know it's an atypical approach but it should still be an approach that is supported.

When I list the files in the package using unzip -l mypackage.1.0.3.nupkg:

Archive:  mypackage.1.0.3.nupkg
  Length     Date   Time    Name
 --------    ----   ----    ----
    16545  02-12-16 17:26   ../../../Assets/Packages/mypackage/Editor/Users/buildcomputer/jenkins/nodes/unitySlave/workspace/<jenkins_job>/Assets/file1.cs   (WRONG!!!)
      262  02-12-16 17:26   ../../../Assets/Packages/mypackage/Editor/Users/buildcomputer/jenkins/nodes/unitySlave/workspace/<jenkins_job>/Assets/file1.cs.meta  (WRONG!!!)
    16545  02-12-16 17:26   ../../../Assets/Packages/mypackage/Editor/file1.cs   (CORRECT)
      262  02-12-16 17:26   ../../../Assets/Packages/mypackage/Editor/file1.cs.meta    (CORRECT)
      533  02-12-16 17:26   mypackage.nuspec
      669  02-12-16 17:26   package/services/metadata/core-properties/coreProp.psmdcp
      489  02-12-16 17:26   _rels/.rels
      541  02-12-16 17:26   [Content_Types].xml
 --------                   -------

A couple things to note:

  1. There are duplicates (file1.cs and file1.cs.meta) show up twice in two different paths. The wrong paths have been denoted above with (WRONG!!!!).
  2. The wrong files seem to contain a near absolute path, but does not actually contain the full path either. Namely, it's missing the "Editor" folder.

My project.template file

type file
copyright My Company 2016
id mypackage
version 1.0.3
authors 
    me
projectUrl 
    http://mypackage.com
description
    my description
files
    Assets/Editor/** ==> ../../../Assets/Packages/mypackage/Editor/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions