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

Fosshub - Changing to use core extension #350

Merged
merged 1 commit into from
Oct 30, 2016
Merged

Fosshub - Changing to use core extension #350

merged 1 commit into from
Oct 30, 2016

Conversation

gep13
Copy link
Member

@gep13 gep13 commented Oct 23, 2016

No description provided.

@gep13
Copy link
Member Author

gep13 commented Oct 23, 2016

@majkinetor this is the changes I was talking to you about.

Trying to change the Fosshub extension to use the new Get-WebContent helper method that was added to the chocolatey-core.extension.

However, when I try to run .\update.ps1 in the audacity folder locally having made these changes, I get the following:

image

So I changed the update.ps1 to include this:

import-module .\..\..\extensions\chocolatey-core.extension\extensions\Get-WebContent.psm1

But this then resulted in the following:

image

If you have a minute, can you look into what might be going on here?

Thanks!

@majkinetor
Copy link
Contributor

I pushed a new version of AU that fixes this problem. I got new errors tho, but those are not related to GetWeb-Content:

Set-Content : Could not find a part of the path 'C:\Users\majkinetor\AppData\Local\Temp\chocolatey\audacity\2.1.2.20161023\ro3ojwdm.1kb.istext'.
At C:\Users\majkinetor\AppData\Local\Temp\chocolatey\au\chocolatey\helpers\functions\Get-WebFile.ps1:205 char:13
+             Set-Content -Path "$fileName.istext" -Value "$fileName ha ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\MAJKIN...jwdm.1kb.istext:String) [Set-Content], DirectoryNotFoundException
    + FullyQualifiedErrorId : GetContentWriterDirectoryNotFoundError,Microsoft.PowerShell.Commands.SetContentCommand


Download of ro3ojwdm.1kb (1,24 KB) completed.
Attempt to use original download file name failed for 'Audacity.html'.
Copying audacity
  from 'Audacity.html'
Copy-Item : Cannot find path 'C:\work\_chocolatey\chocolatey-coreteampackages\automatic\audacity\Audacity.html' because it does not exist.
At C:\Users\majkinetor\AppData\Local\Temp\chocolatey\au\chocolatey\helpers\functions\Get-ChocolateyWebFile.ps1:350 char:5
+     Copy-Item $url -Destination $fileFullPath -Force

@gep13
Copy link
Member Author

gep13 commented Oct 23, 2016

@majkinetor when you say you pushed a new version, what does that mean? Can I update through PowerShell Gallery?

@majkinetor
Copy link
Contributor

No, download latest artifact, unpack it and run install.ps1.
Alternativelly, you can git clone au locally and ./build -Install.

@gep13
Copy link
Member Author

gep13 commented Oct 23, 2016

@majkinetor okay, installed locally, after updating my clone. Thanks!

Any thoughts on this new error then? Is that a package issue? Or something else?

@majkinetor
Copy link
Contributor

Didn't have time to investigate it yet.

@gep13
Copy link
Member Author

gep13 commented Oct 23, 2016

Okay, not a problem.

@majkinetor majkinetor self-assigned this Oct 28, 2016

$htmlPage = $webClient.DownloadString($linkUrl)
$opts = @{ Headers = @{ Referer = 'https://www.fosshub.com/${fosshubAppName}' } }
$htmlPage = Get-WebContent -url "http://example.com" -options $opts
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, no wonder it doesn't work

@majkinetor
Copy link
Contributor

10 [ M:1 D:0 A:0 ?:1 ]  16-10-29 17.37.31  C:\work\_chocolatey\chocolatey-coreteampackages\automatic\qbittorrent
FosshubChanges~> .\update.ps1
qbittorrent - checking updates using au version 2016.10.29
nuspec version: 3.3.7
remote version: 3.3.7
No new version found, but update is forced
New version is available
Automatic checksum started
WARNING: C:\Users\MAJKIN~1\AppData\Local\Temp\chocolatey\qbittorrent\3.3.7.20161029\4hf3nxgy.a2d is of content type text/html; charset=utf-8

Download of 4hf3nxgy.a2d (-1 B) completed.
Downloading qBittorrent 32 bit
  from 'https://download.fosshub.com/Protected/expiretime=1477755537;badurl=aHR0cDovL3d3dy5mb3NzaHViLmNvbS9xQml0dG9ycmVudC5odG1s/343790ce2028d24e7d99b8dbc3a4a8c405a2ceeae49c7f0c9b5fb390bc432c05/qBittorrent/qbittorrent_3.3.7_setup.exe'

Download of qbittorrent_3.3.7_setup.exe (15,7 MB) completed.
Package downloaded and hash calculated for 32 bit version
Updating files
  $Latest data:
    Checksum32      (String)    49ae9a0adfc3272bec38822c528f732d9495b79a2a7ca934f8c6635237b15d07
    ChecksumType32  (String)    sha256
    NuspecVersion   (String)    3.3.7
    PackageName     (String)    qbittorrent
    URL32           (String)    https://www.fosshub.com/qBittorrent.html/qbittorrent_3.3.7_setup.exe
    Version         (String)    3.3.7.20161029

  qbittorrent.nuspec
    setting id:  qbittorrent
    using Chocolatey fix notation: 3.3.7 -> 3.3.7.20161029
  .\tools\chocolateyInstall.ps1
    (^[$]checksumType\s*=\s*)('.*') = $1'sha256'
    (^[$]fosshubUrl\s*=\s*)('.*') = $1'https://www.fosshub.com/qBittorrent.html/qbittorrent_3.3.7_setup.exe'
    (^[$]checksum\s*=\s*)('.*') = $1'49ae9a0adfc3272bec38822c528f732d9495b79a2a7ca934f8c6635237b15d07'
Attempting to build package from 'qbittorrent.nuspec'.
Successfully created package 'C:\work\_chocolatey\chocolatey-coreteampackages\automatic\qbittorrent\qbittorrent.3.3.7.20161029.nupkg'
Package updated

@gep13 gep13 force-pushed the FosshubChanges branch 2 times, most recently from 1515c6f to 1440ddb Compare October 30, 2016 09:30
@gep13
Copy link
Member Author

gep13 commented Oct 30, 2016

@majkinetor Doh! Thanks for taking a look at this, and fixing it up.

I have just rebased this PR to bring it up to date with the latest master branch, and I was confused to find that the commit where I moved the packages to use the new core extension was removed. When I checked, it looks like it already got merged into master.

This happened here:

image

Not entirely sure how that managed to happen, but it looks like it got pulled in when you were merging the jitsi package.

All that was left in this PR was the single commit that is still here, where you changed example.com to the correct $linkUrl variable, and another commit from you about removing accidential commit. This commit was deleting the jitsi update.ps1 file, which I don't think we want to happen, so I removed that commit from this PR.

@gep13 gep13 merged commit 952acd3 into master Oct 30, 2016
@gep13 gep13 deleted the FosshubChanges branch October 30, 2016 09:36
@gep13
Copy link
Member Author

gep13 commented Oct 30, 2016

@majkinetor also, I still don't get the above update.ps1 to work locally, I still see the Get-WebContent error. Have you done anything else different on your machine to get it to work?

I have updated to the latest AU version, thinking that you added something in there, but still no joy.

@majkinetor
Copy link
Contributor

I was moving between branches and when quickly testing your stuff back then I accidentally pushed some of my unreleated work - so its probably merged because of it.... sorry. I took care that it doesn't happen in the future, current branch is now VERY visible in shell.

I will recheck again to see if I can reproduce.

@gep13
Copy link
Member Author

gep13 commented Oct 30, 2016

@majkinetor said...
current branch is now VERY visible in shell.

What changes have you made?

@majkinetor said...
I will recheck again to see if I can reproduce.

Thank you, appreciate it!

@majkinetor
Copy link
Contributor

majkinetor commented Oct 30, 2016

What changes have you made?

SImilar to posh-git but in my prompt function within my profile.d.

@majkinetor
Copy link
Contributor

Fixed in au.

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.

2 participants