Newly 3rd party application manager not working correctly

Support forums for the Habitat Automate plugin
User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Newly 3rd party application manager not working correctly

Post by Cubert »

Ok figured it out...


What is happening is the Version of notepadplusplus pre 8.2 calls the notepadplusplus repo package.

In version 8.2 of the repo package it flips and looks for notepadplusplus.install on the repo.

Well of course its not there as it is a different package from just notpadplusplus.



In the image you can see I attempted a install, it failed eve though I had the package there. In the error it referenced notepadplusplus.install was not on repo, which is correct.

I then executed our repo caching command for that package and the retried install of same package. This time it went through without issues.

So this is not a plugin issue but a who ever built the package decided to flip packages.
Capture.PNG
Capture.PNG (82.1 KiB) Viewed 1614 times

To fix this issue you can change the package in the repo search to notepadplusplus.install and it should no longer use the notepadplusplus package which is now just a big redirect to notepadplusplus.install


Select notepadplusplus and right click to update, it will load above, edit the package field to include ".install" and select add.

On next run it will use that package to install notepade. Any install via cache issued will now use this package to install.
Capture1.PNG
Capture1.PNG (100.2 KiB) Viewed 1614 times

lblokland
Posts: 32
Joined: Wed Nov 17, 2021 1:29 pm
2

Re: Newly 3rd party application manager not working correctly

Post by lblokland »

This is my error:
Attachments
error.png
error.png (138.11 KiB) Viewed 1597 times

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Newly 3rd party application manager not working correctly

Post by Cubert »

You did see this? yes...
You were to edit that line changing the "YourLocationDriveHere" to your actual location drive setting as found in the location console.
Capture1.PNG
Capture1.PNG (13.74 KiB) Viewed 1593 times

lblokland
Posts: 32
Joined: Wed Nov 17, 2021 1:29 pm
2

Re: Newly 3rd party application manager not working correctly

Post by lblokland »

Sorry, I looked over that.
Now it is as follows:
Attachments
error1.png
error1.png (248.69 KiB) Viewed 1590 times

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Newly 3rd party application manager not working correctly

Post by Cubert »

Exactly!!!

Do you see it flip from notepadplusplus to notepadplusplus.install in the error logs when trying to install notepad++

This is the issue, Your local cache repo does not have notepadplusplus.install.8.2 but only notepadplusplus8.2

This issue is happening because the manager of this packaged decided that he didn't want to maintain 2 packages anymore and wrote a redirect into the notepadplusplus package. So how do you fix this oversight of the maintainer?

Add notepadplusplus.install package to your local repo leaving the notepadplusplus package there along side.

On the caching agent for that location open a command line and execute the following.

Code: Select all

c:\windows\ltsvc\Habitat\ChocoCacher.exe \\SOL-S01\Site-Cache\Habitat\packages  http://chocolatey.org/api/v2/package/notepadplusplus.install/
This should download and push to cache location the other notepad++ installer. (notepadplusplus.install) Once completed and you can verify that new file exists on local cache then rerun the update as normal and watch the logs.

It will complete successfully.

This is just part 1, You still have X number of clients to go. To fix everyone now, just update the main plugin search area and change the notepad++ package from notepadplusplus to notepadplusplus.install

What will this do? It will force all caching agents on next cache to now download notepadplusplus.install.8.2 as a package available on the local repos caches. Then the agents when told to update notpad++ the next go around will have the new package available to them and the updates will complete successfully for everyone.

lblokland
Posts: 32
Joined: Wed Nov 17, 2021 1:29 pm
2

Re: Newly 3rd party application manager not working correctly

Post by lblokland »

Are we not moving the problem now? one package is not working and now all kind of other stuff start breaking up.
I'm new to choco, but looks to me that this is not the way to fix an app to be installed.

Shouldn't this be reported to the Chocolateley package creators?

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Newly 3rd party application manager not working correctly

Post by Cubert »

If you are new to Chocolatey then yes, I would spend some time going over Chocolatey.org to understand the framework in use and how it interacts with the community that maintains the repositories.


In their defense, They will say it's not broken as they have both packages on their repo and so placing a redirect to a different hosted package is acceptable. They will further go to say that if you operate your own repo (Cache location drive) that it is up to you to maintain any dependencies apps. Unfortunately there is no list of dependencies we can query to assist it that effort. So automating a dependency list caching is not in the cards currently.

In our plugin we choose to only download applications packages you list as application searches instead of downloading the entire repository to your location drives. You could see how that would be a really bad idea, repository holds 5K worth of software titles and different versions which would overwhelm the location drive.

Now there are adjustments you can make to the plugin to help mediate some of these issues.

# 1 Change the search to match the changes in packages. (notepadplusplus to notepadplusplus.install)

#2 Add a new search to include any package dependency to an extreme search phrase.
NotepadPlusPlus needs NotePadPlusPlus.install so add a search that says:
Search= "ntepadplusplusWillNeverFindInSoftware"
Package = "notepadplusplus.install"
What will happen is that the search will never find the actual software title (does not exist) but since its an approved package, all caching agents across all clients will download package to local location drive anyway. Now you have both the original package and its dependent. This will work for any dependent package you might have.

A prime example of a dependency "search" you should probably have.

Search = "chocolatey-core.extension"
Package = "chocolatey-core.extension"


This is not included in the default list provided but several packages expect the tools it provides to be there and so you may see a package fail if this is not present in cache.

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Newly 3rd party application manager not working correctly

Post by Cubert »

Solving dependency issue with chocolatey-core.extension
Capture1.PNG
Capture1.PNG (15.28 KiB) Viewed 1559 times

lblokland
Posts: 32
Joined: Wed Nov 17, 2021 1:29 pm
2

Re: Newly 3rd party application manager not working correctly

Post by lblokland »

True, seems to have worked.
Is there a way to include this dependency into the framework?

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Newly 3rd party application manager not working correctly

Post by Cubert »

Simple answer is no, the framework is maintained by Chocolatey so getting things included would not be the direction. It comes down to knowing your packages and what they need. Periodically reviewing the install and update logs for failures, read through the failures to find the reason which is typically a redirect or a dependence missing. Either on can be remedied by adding that resource to the plugins search.

Post Reply

Return to “Habitat”