Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(7zip*) migrated from ferventcoder #488

Merged
merged 21 commits into from
Jan 18, 2017
Merged

(7zip*) migrated from ferventcoder #488

merged 21 commits into from
Jan 18, 2017

Conversation

majkinetor
Copy link
Contributor

@majkinetor majkinetor commented Dec 21, 2016

@majkinetor majkinetor self-assigned this Dec 21, 2016
@pascalberger
Copy link
Member

@majkinetor Will you change this also to an embedded package? Based on the license I think this should be possible.

@majkinetor
Copy link
Contributor Author

Will you change this also to an embedded package?

Yes, this should be embedded. You, rather then me, should do it, since you are migrating it now. Its easier then creating online installer and people should get used to it. See vlc as an example or any other that uses it.

In short:

  • you can use Get-RemoteFiles in this repository (still unpublished) but this repo uses NEXT version.
  • you will need to create embedded intaller which differes from online one (no checksums, urls etc.). I created Get-RemoteFiles in such way that changes to chocolateyInstall are trivial (in general case only silentArgs should be filled in and removed arch's that aren't used).

@majkinetor
Copy link
Contributor Author

majkinetor commented Dec 22, 2016

Ah, sorry, I thought I was writting on Git PR.

Yes, I will embedd this one.

@majkinetor majkinetor changed the title (7zip*) migrated from ferventcoder (7zip*) migrated from ferventcoder [Requires chocolatey user] Dec 23, 2016
@gep13
Copy link
Member

gep13 commented Dec 24, 2016

@majkinetor chocolatey user has been added to each of these packages on chocolatey.org.

@pascalberger pascalberger changed the title (7zip*) migrated from ferventcoder [Requires chocolatey user] (7zip*) migrated from ferventcoder Dec 24, 2016
@majkinetor majkinetor removed their assignment Dec 25, 2016
@ferventcoder
Copy link
Contributor

This ready?

@AdmiringWorm
Copy link
Member

AdmiringWorm commented Jan 12, 2017

@ferventcoder doesn't look like it, looks like it's currently just the same code as in your repo

EDIT:
I plan to continue on @majkinetor work this wekend, unless he finds the time to do it instead.

@ferventcoder
Copy link
Contributor

Right on.

@AdmiringWorm
Copy link
Member

I believe this is done now, could someone please review it?

All issues at @ferventcoder is fixed except for ferventcoder/chocolatey-packages#82 which I couldn't reproduce, making me think it have been fixed upstream

<title>7-Zip (Portable, CommandLine)</title>
<version>0.0</version>
<authors>Igor Pavlov</authors>
<owners>Rob Reynolds, chocolatey</owners>
Copy link
Member

Choose a reason for hiding this comment

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

List chocolatey first as per §1.2.4

Copy link
Member

Choose a reason for hiding this comment

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

ah thanks, I forgot about that one.
Don't know why it's in there though, as the owners element isn't used on chocolatey.org as far as I know.

<docsUrl>http://www.7-zip.org/faq.html</docsUrl>
<mailingListUrl>https://sourceforge.net/p/sevenzip/discussion/45797/</mailingListUrl>
<bugTrackerUrl>https://sourceforge.net/p/sevenzip/_list/tickets?source=navbar</bugTrackerUrl>
</metadata>
Copy link
Member

Choose a reason for hiding this comment

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

Add <releaseNotes> (http://www.7-zip.org/history.txt)

Copy link
Member

Choose a reason for hiding this comment

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

thanks, I wasn't able to find the changelog for 7zip

<?xml version="1.0" encoding="utf-8"?>
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<metadata>
<id>7zip.commandline</id>
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we take the oppertunity and rename this to 7zip.portable?

Copy link
Member

Choose a reason for hiding this comment

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

sure, we can do that.
I just didn't have that as a priority at the moment

$packageArgs.file = $filePathExtra
Get-ChocolateyUnzip @packageArgs

Remove-Item -Path "$toolsDir\Uninstall.exe",$filePath32,$filePath64,$filePathExtra -Force
Copy link
Member

Choose a reason for hiding this comment

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

Add -ea 0 to avoid install failing in case this fails, like it was done in other packages

Copy link
Member

Choose a reason for hiding this comment

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

will do

$Latest.ChecksumType = 'sha256'

try {
$client = New-Object System.Net.WebClient
Copy link
Member

Choose a reason for hiding this comment

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

Should be outside of the try, since in case this throws an exception you don't want the finally block to be run, since it would throw another exception.

Copy link
Member

Choose a reason for hiding this comment

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

this isn't .NET, so it don't matter if it's outside or inside the try/catch. (as far as I know)

Copy link
Member

Choose a reason for hiding this comment

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

but I'll change it anyhow

Start-Process explorer.exe
}

Remove-Item "$filePath32*","$filePath64*" -Force -ErrorAction SilentlyContinue
Copy link
Member

Choose a reason for hiding this comment

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

-ea 0 instead of -ErrorAction SilentlyContinue to be consistent with other packages

function global:au_SearchReplace {
@{
".\tools\chocolateyInstall.ps1" = @{
"(?i)(^\s*softwareName\s*=\s*)'.*'" = "`$1'$softwareNamePrefix $($Latest.RemoteVersion)*'"
Copy link
Member

Choose a reason for hiding this comment

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

IMHO using $Latest.RemoteVersion is not 100% acurrate. It makes sense as long as the already installed version is the previous version, but what if I skip versions? But currently also don't have a better idea :(

Copy link
Member

Choose a reason for hiding this comment

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

Actually, in this case it will be accurate.
The software name should be part of or equal to the name displayed in program and features

Copy link
Contributor

Choose a reason for hiding this comment

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

Minus the version IMHO as well. If need be the major version.

"(?i)(^\s*softwareName\s*=\s*)'.*'" = "`$1'$softwareNamePrefix $($Latest.RemoteVersion)*'"
}
".\tools\chocolateyUninstall.ps1" = @{
"(?i)(\s*\-SoftwareName\s+)'.*'" = "`$1'$softwareNamePrefix $($Latest.RemoteVersion)*'"
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it be $Latest.Version here?

Copy link
Member

Choose a reason for hiding this comment

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

no, $Latest.Version will be changed if there is a fix version, which will make the uninstall script unusable since it won't be able to find the uninstall key

Copy link
Contributor

Choose a reason for hiding this comment

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

Why the version here?

<title>7-Zip</title>
<version>0.0</version>
<authors>Igor Pavlov</authors>
<owners>Rob Reynolds, chocolatey</owners>
Copy link
Member

Choose a reason for hiding this comment

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

List chocolatey first as per §1.2.4

<iconUrl>https://cdn.rawgit.com/chocolatey/chocolatey-coreteampackages/dbedb56d5ff709cd37f4abecc736d4a9e6400da8/icons/7zip.svg</iconUrl>
<docsUrl>http://www.7-zip.org/faq.html</docsUrl>
<mailingListUrl>https://sourceforge.net/p/sevenzip/discussion/45797/</mailingListUrl>
<bugTrackerUrl>https://sourceforge.net/p/sevenzip/_list/tickets?source=navbar</bugTrackerUrl>
Copy link
Member

Choose a reason for hiding this comment

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

Add <releaseNotes> (http://www.7-zip.org/history.txt)

Copy link
Member

Choose a reason for hiding this comment

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

although it doesn't show up, I've added the release notes below this line

Copy link
Member

Choose a reason for hiding this comment

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

@AdmiringWorm Where and why doesn't it show up? Should be shown on chocolatey.org...

Copy link
Member

Choose a reason for hiding this comment

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

sorry, I meant it doesn't show where just commented as it was added on the line below

Copy link
Member

Choose a reason for hiding this comment

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

Ah, comments in GitHub can be confusing :) I think I commented the closing metadata tag

Copy link
Member

Choose a reason for hiding this comment

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

you did for the other two packages.

@AdmiringWorm
Copy link
Member

@pascalberger
I believe I've added/responded to the feedback you provided.
With the exception of moving to 7zip.portable, will do that to but not yet.

@AdmiringWorm
Copy link
Member

I believe the 7zip packages is now finally done.

/cc @pascalberger @ferventcoder

@pascalberger
Copy link
Member

Thanks, LGTM

@AdmiringWorm
Copy link
Member

I'm just looking for a 👍 from @ferventcoder before this can be merged.

@AdmiringWorm
Copy link
Member

I noticed the following packages need to be unrejected.
7zip v16.04
7zip.install v16.04

Not sure about 7zip.commandline v16.04 needs to unrejected though, as we're deprecating it.

/cc @chocolatey/community-moderators

@gep13
Copy link
Member

gep13 commented Jan 17, 2017

@AdmiringWorm I have unrejected the first two packages. For the last one, I would be tempted to push out a package fix notation version, that way it is clear that it isn't an "official" release.

$packageName = '7zip.install'

$uninstalled = $false
[array]$key = Get-UninstallRegistryKey -SoftwareName '7-zip 16.04*'
Copy link
Contributor

Choose a reason for hiding this comment

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

Never a fan of passing the version. It doesn't upgrade well.

Copy link
Member

Choose a reason for hiding this comment

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

Originally my reason for passing the version was to allow users to install multiple 7zip versions side-by-side, but noticed now that it doesn't matter since the registry key is overwritten anyhow.
I'll change it back to not pass the version.

Copy link
Contributor

Choose a reason for hiding this comment

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

Version 9.x and 15/16.x can be installed separately.

<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<metadata>
<id>7zip.commandline</id>
<title>[Deprecated]7-Zip (Portable, CommandLine)</title>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get a space after "]"? It should always be "[Deprecated] Title"

@ferventcoder
Copy link
Contributor

Looks great. Just a few minor issues...

@AdmiringWorm
Copy link
Member

@ferventcoder I've made the requested changes, if there isn't anything else I believe this can now be merged.

@ferventcoder
Copy link
Contributor

LGTM

@AdmiringWorm AdmiringWorm merged commit 68b91a8 into master Jan 18, 2017
@AdmiringWorm AdmiringWorm deleted the 7zip branch January 18, 2017 07:12
@AdmiringWorm
Copy link
Member

👍
The build is running to update the 7zip packages now, when it's done and the 7zip.portable package is approved I can push out the deprecated 7zip.commandline package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants