Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
Activity
• Sep 26 10:12
FlavioRyu commented #977
• Sep 25 16:42
RickStrahl commented #977
• Sep 25 16:38
RickStrahl closed #978
• Sep 25 16:38
RickStrahl commented #978
• Sep 25 16:37
RickStrahl commented #978
• Sep 25 13:43
royog commented #978
• Sep 25 03:27
RickStrahl closed #963
• Sep 25 03:27
RickStrahl closed #975
• Sep 25 03:27
RickStrahl closed #976
• Sep 25 03:26
RickStrahl commented #978
• Sep 25 03:25
RickStrahl commented #978
• Sep 24 15:40
royog commented #978
• Sep 24 00:21
RickStrahl commented #978
• Sep 24 00:18
RickStrahl commented #978
• Sep 24 00:12
RickStrahl commented #978
• Sep 23 23:04
royog commented #978
• Sep 23 22:44
RickStrahl commented #978
• Sep 23 22:44
RickStrahl commented #978
• Sep 23 21:36
royog commented #978
• Sep 23 21:23
royog commented #978
Gary Ewan Park
@gep13
Is the work checked into the repo already? Happy to review prior to you pushing it out if you want?
Rick Strahl
@RickStrahl
Couple of questions
verify.txt what needs to go in there?
I don't think there's anything to see. The .ps1 is empty with all the distribution files in the .\tools folder (copied by the build process)
I have this in verify.txt:
MarkdownMonster.exe
Sha256: 3A39D79914EFD3B21BCD24F6794464F4904E4F17F23F67F414283E844945CCA1
Do I even need that if I push up the files embedded in there?
Gary Ewan Park
@gep13
Since you are embedding, and due to the fact that you are a known maintainer for your own packages, the verify.txt and checksums are not required.
Ideally, there would still be a license file in the chocolatey package though
Rick Strahl
@RickStrahl
Ah Ok.
Anything I need to do with the uninstall file (other than remove comments). It seems to work without any changes made.
Gary Ewan Park
@gep13
If the literally have nothing in the chocolateyinstall.ps1 file, then simply omit that, and as a result, you won't need the chocolateyuninstall.ps1 file either
Rick Strahl
@RickStrahl
Does that even need to be there? Chocolatey will just wipe out the folder right?
Yeah that's what I thought because the contents of that file wouldn't work anyway. Cool. Less is good :-)
Gary Ewan Park
@gep13
Yip, if it is an embedded package, with just contents, Chocolatey will wipe out the folder on uninstallation. It is only if you do additional steps in the install.ps1 file, that you would need to undo these in the uninstall.ps1
Rick Strahl
@RickStrahl
Can i omit the chocolateyinstall.ps1 file too then?
Gary Ewan Park
@gep13
If the literally have nothing in the chocolateyinstall.ps1 file, then simply omit that
Rick Strahl
@RickStrahl
FWIW, I haven't been able to find the docs on any of this. It may be there but I can't find the docs for an embedded install.
Gary Ewan Park
@gep13
:point_up:
@RickStrahl see my comment in the issue :-)
Rick Strahl
@RickStrahl
Not that it matters so much now :-)
Gary Ewan Park
@gep13
Rick Strahl
@RickStrahl
So, there's nothing much left of my build script now that I don't need all these files:
# Script builds a Chocolatey Package and tests it locally
#
#  Assumes: Uses latest release out of Pre-release folder
#           Release has been checked in to GitHub Repo

cd "$PSScriptRoot" remove-item ".\tools" -recurse -force #$sourceFolder = "..\Distribution"
# $file = "$sourceFolder\MarkdownMonster.exe"
# write-host $file #$sha = get-filehash -path "$file" -Algorithm SHA256 | select -ExpandProperty "Hash" # write-host$sha

robocopy $sourceFolder .\tools /MIR copy ..\license.txt .\tools\license.txt #empty install file - we just have content no code #$filetext = ""
#out-file -filepath .\tools\chocolateyinstall.ps1 -inputobject $filetext # uninstall script # copy chocolateyuninstall.ps1 .\tools #$filetext = @"
#MarkdownMonster.exe
#Sha256: $sha #"@ # out-file -filepath .\tools\verify.txt -inputobject$filetext

del *.nupkg

# Create .nupkg from .nuspec
choco pack

choco uninstall "MarkdownMonster.Portable"

choco install "MarkdownMonster.Portable" -fdv -y  -s ".\"
As a nice side effect I looked a lot closer at running the portable version and found a few more little things that weren't working right that got fixed (like missing icons) and a few other UI quiks.
:+1:
Gary Ewan Park
@gep13
you know, if you wanted, you could embed the exe into this package as well: https://chocolatey.org/packages/MarkdownMonster rather than first downloading it as well, that would also save the need for the checksums :-D
Rick Strahl
@RickStrahl
So I pushed it up markdownmonster.portable
It looks like it made it but choco push is totally hung.
I remember this happened with the previous version as well. Console is dead I have to shut it down.
eventually returned. It says it's timed out, but the package is up on choco.
Rick Strahl
@RickStrahl
The checksums aren't a big problem since those are auto-generated as part of the build process and embedded into the choco script. Main thing I don't like is that the upload takes a while and apparently hangs a lot of the time.
Rick Strahl
@RickStrahl
Hmmm... so looks like the uninstall isn't working:
Gary Ewan Park
@gep13
hmm, that looks like a question for @ferventcoder
any ideas Rob?
Rick Strahl
@RickStrahl
Looks like the uninstall is looking in some odd folders for uninstall. There's no uninstall.ps1 (or install for that matter).
The question is why is it looking in the lib-bkp folder.
Gary Ewan Park
@gep13
during the uninstallation process, Chocolatey moves items into that folder, so that if something goes wrong, it can recover the installation.
Rob Reynolds
@ferventcoder

:point_up: January 15, 2017 3:34 AM

Yip, if it is an embedded package, with just contents, Chocolatey will wipe out the folder on uninstallation

Chocolatey is a tad bit smarter than that. On uninstall it removes all unchanged files and leaves files that have changed. If you uninstall with force, it will wipe all files, including files created and user changed files. Same goes for upgrade.

@RickStrahl @gep13 chocolatey/choco#1139 for the uninstall issue - it looks like something was running and locking the folder, so when it moves the files to lib-bkp and later attempts to delete them, it fails because the locked files are now there.
Rob Reynolds
@ferventcoder
It should not cause a failure, only warnings. However it looks like in this case it may not have had the ability to create the copies back in the actual lib directory so it considered it a failure.
:point_up: January 15, 2017 4:26 AM for the push hang. I push up 7MB and don't run into this very often. Let me see if maintenance can clear this up.
Rob Reynolds
@ferventcoder
@RickStrahl I just performed maintenance on Chocolatey.org. It's coming back up now. I'd be curious to know if you are still running into hangups after this.
Rick Strahl
@RickStrahl
@ferventcoder Yeah I saw the error message, but I checked and I made sure there was nothing running or any explorer folders open in the folder structure which made that puzzling.