## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
Jurjen Biewenga
@JurjenBiewenga
But improved, again we didn't change anything and it suddenly broke
Gary Ewan Park
@gep13
So when you say "things aren't working" are you referring to using choco.exe or your own application?
Jurjen Biewenga
@JurjenBiewenga
The chocolatey.lib api
Gary Ewan Park
@gep13
It would help to have this information
Jurjen Biewenga
@JurjenBiewenga
We've been using the api for more than a year and a half
Gary Ewan Park
@gep13
@JurjenBiewenga I personally, and I don't think anyone else here in this chat, has that information. So when you say that "things aren't working" we assume you are referring to choco.exe rather than some custom implementation. Can you see how that might cause us confusion/
Jurjen Biewenga
@JurjenBiewenga
Yes, I'm sorry. It's just a little frustrating since it appears that Chocolatey is always breaking in our scenario.
Gary Ewan Park
@gep13
Sorry to labour the point, but let’s be clear here... Is Chocolatey, I.e. choco.exe breaking here? Or is your implementation of the Chocolatey.Lib (which we haven’t seen the usage of) not working how you would expect it to?
Jurjen Biewenga
@JurjenBiewenga
Chocolatey.Lib, working on getting a copy of the "fixed" code
I'm not the one currently debugging
Right, this version seems to work consistently https://hastebin.com/nogozereka.cs
If we remove the Thread.Sleep it doesn't
It's querying a specific package by name with a version on a local file source
Jurjen Biewenga
@JurjenBiewenga
Seems like it has to do with potentially having 2 queries running at the same time
Michael Howell
@notriddle
Anybody have any idea what the error in this is?
I can't find any actual error messages, and another nearly-identical package tested successfully.
Rob Reynolds
@ferventcoder
We call that a timeout
It did not finish executing in the allotted timeframe
Michael Howell
@notriddle
Should I just try it again?
Here's https://gist.github.com/choco-bot/3cbefd4a36e0f21ab0973defd26189dc the nearly-identical package that passed.
Moritz 'Morty' Strübe
@cmorty
@notriddle : I had to resubmit mine several times until it got through. It eventually did.
@ferventcoder : There seems to be an overload-issue with the server, though. Just ex- and importing the Choco-functions takes 1,4 sec. Running checksum.exe takes 4 seconds... I had one case where execution stopped while unpacking, even before the chocolateyInstall.ps1 was executed.
Rob Reynolds
@ferventcoder
It's likely
We are looking at sone options over the next few weeks
n3rd4i
@n3rd4i
Hi, I want to change the content of an *.ini in-place. Sure in powershell this is possible with extensions like: PsIni but maybe there a build in cleaner way ? The big idea is to have something like sed -i will be the general case. This will be done a in a package installation. Any suggestions on this?
Rob Reynolds
@ferventcoder
There are options but you will end up with folks questioning why there are dependencies on other packages (sed or related in this case). I'd recommend sticking with PowerShell until you have no other choice. We see this a lot with AutoHotKey being needed for bad installations - the question of why it's required and not wanting to install a package with dependencies on things that are really just dependencies of managing the installation/uninstallation
n3rd4i
@n3rd4i
I can detail, the package in question will install with default configuration from the original SW. This default/original configuration seems invalid. The detail is in the *.ini config file for the SW (in this case is a MOD for a game). Using sed -i will allow the package to fix *.ini from default to working. This means the user does not need to do that manually since he/she will be more interested of using the mod than spending time on configuration. contents of RA2MO.ini e.g.:
-Renderer=Default
+Renderer=TS_DDRAW_2
n3rd4i
@n3rd4i
Actually PowerShell supports this with small tweak, this can be included inside the package install file:
(Get-Content "$iniFile") -replace 'Renderer=Default', 'Renderer=TS_DDRAW_2' | Set-Content "$iniFile"
Ringtailed Fox
@RingtailedFox_gitlab
greetings, everyone! i come from the chocolatey irc room on freenode.... i was hoping to find some assistance and advice on chocolatey and its packages
i have gimp, cmake, winscp and putty already installed on my machine.. is there a way to have chocolatey manage them for update purposes, or do i have to uninstall, then re-install them with chocolatey?
also, how do i force Emacs to install to C:\Program Files\Emacs and NirLauncher to C:\NirLauncher? NirLauncher wants to go into C:\TOOLS\, which i don't want, while Emacs wants to go into the chocolatey bin folder in C:\ProgramData\Chocolatey\Bin...
Rob Reynolds
@ferventcoder
If you install a newer version through a Chocolatey package, it will simply upgrade the underlying software and choco will take over @RingtailedFox_gitlab
Ringtailed Fox
@RingtailedFox_gitlab
oh nice!
Rob Reynolds
@ferventcoder
Emacs might be a portable type that is extracting a zip, so to go to program files you might be looking for the emacs installer package (if one exists)
Ringtailed Fox
@RingtailedFox_gitlab
i see
Rob Reynolds
@ferventcoder
NirLauncher likely details package params that may have an install directory - the c:\tools is using an environment variable called ChocolateyToolsLocation (IIRC)
@n3rd4i the powershell method looks fine 😀
Ringtailed Fox
@RingtailedFox_gitlab
i wonder if there's a way for chocolatey to find stuff already-installed on my computer like LibreOffice... so it doesn't have to download the often huge-sized installers...
like... i know the LibreOffice one's a few hundred MB and takes a few minutes to install, even on my SSD :P
@xmha97
Some packages are out of date.
How can I update them?
Kim J. Nordmo
@xmha97 you can't update a package that you do not maintain.
To get a package updated that is maintained by another user, use the Contact Maintainers link on the package page and ask them to update the package.
Manfred Wallner
@mwallner
is there a pattern / example on how to handle specific exit codes in a Chocolatey package?
i.e. if vs_professional.exe upgrade --noweb --noupdateinstaller fails with exit code '1', I want to "retry" without the -noupdateinstaller argument.
is there a way to (cleanly) get the exit code of a Install-ChocolateyInstallPackage ?
Andrea
@icyz
Rob Reynolds
@ferventcoder
Package or software?
Andrea
@icyz
sorry, software
Rob Reynolds
@ferventcoder
If it was downloaded to the cache and meets checksum/content length checks, it may use the one in cache - no guarantee though and I would not use that cross machine - folks have seen locking issues, etc based on software installer behavior (not choco)
Andrea
@icyz
I've already tried, but seems it not use the one in cache
To get a package updated that is maintained by another user, use the Contact Maintainers` link on the package page and ask them to update the package.