Skip to content

Update packaging to only package PowerShell binaries when packaging symbols - #5145

Merged
Aditya Patwardhan (adityapatwardhan) merged 4 commits into
PowerShell:masterfrom
TravisEz13:fixCompliancePackage
Oct 23, 2017
Merged

Aditya Patwardhan (adityapatwardhan) merged 4 commits into
PowerShell:masterfrom
TravisEz13:fixCompliancePackage

Conversation

@TravisEz13

@TravisEz13 Travis Plunk (TravisEz13) commented Oct 17, 2017 •

Copy link
Copy Markdown
Member

disallow all other package types for symbols, as this package is no longer intended to be installed.

I run compliance tools on all binaries in this packages and we are getting more issues from the dependencies than from our product binaries.

…ting symbols zip. disallow all other package types for symbols
@TravisEz13

Copy link
Copy Markdown
Member Author

https://github.com/PowerShell/PowerShell/pull/5145/files?w=1 make this a lot easier to review.

elseif(-not $IncludeSymbols.IsPresent -and $Script:Options.CrossGen) {
$crossGenCorrect = $true
}
elseif ($IncludeSymbols.IsPresent) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So now it's OK to specify -IncludeSymbols while build with -Crossgen?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the non-publish builds always keep the symbols, unaltered.

Comment thread tools/packaging/packaging.psm1 Outdated
log 'setting IncludeSymbols'
$IncludeSymbols = $PSBoundParameters['IncludeSymbols']
}
log "$($IncludeSymbols.IsPresent):$IncludeSymbols"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When -IncludeSymbols is not specified, this log will print just a colon.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove... this was troubleshooting...

{
$tempPath = [System.IO.Path]::GetTempPath()

$tempFolder = Join-Path -Path $tempPath -ChildPath ([System.IO.Path]::GetRandomFileName())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about replace these 2 lines with [System.IO.Path]::GetTempFileName()?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This API creates the file. I want a folder.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, but you can use that name to create a folder. The two lines of script shown here are doing the same thing.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have to delete the file before I can create a folder with the name.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your point. Yeah, please ignore this comment.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With minor comment

Comment thread tools/packaging/packaging.psm1 Outdated
}
if($IncludeSymbols.IsPresent)
{
Remove-Item -Path $Source -Recurse -Force

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe -ErrorAction SilentlyContinue?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@adityapatwardhan

Copy link
Copy Markdown
Member

Dongbo Wang (@daxian-dbw) can you update your review?

@daxian-dbw Dongbo Wang (daxian-dbw) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with 2 comments.

{
$tempPath = [System.IO.Path]::GetTempPath()

$tempFolder = Join-Path -Path $tempPath -ChildPath ([System.IO.Path]::GetRandomFileName())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, but you can use that name to create a folder. The two lines of script shown here are doing the same thing.

}
if($IncludeSymbols.IsPresent)
{
Remove-Item -Path $Source -Recurse -Force -ErrorAction SilentlyContinue

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if you can put a comment here saying that "$Source is point to a temporary folder when -IncludeSymbols is present".

@daxian-dbw Dongbo Wang (daxian-dbw) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit 14af252 into PowerShell:master Oct 23, 2017
@TravisEz13
Travis Plunk (TravisEz13) deleted the fixCompliancePackage branch December 2, 2017 02:16
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
…ymbols (PowerShell#5145)

* Update packaging script to only package PowerShell binaries when creating symbols zip.  disallow all other package types for symbols

* remove instrumentation used for debugging during development

* Add error action silently continue to cleanup for reliability.

* Add comment about why folder is being deleted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants