winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

IndexCreationTool.exe - Tryng to find not existing data in WorkingDirectory

Open JohnnyElvis opened this issue 1 year ago • 4 comments

Brief description of your issue

I'm trying to create a source.msix file with the IndexCreationTool.exe. Unfortunately I'm getting into an issue resulting in following message: e.g "Could not find a part of the path 'C:\Temp\PrivateStore\WorkDir\7\7zip\7zip\22.00\7zip.7zip.installer.yaml'."

When I copy data into the WorkDir it get's automatically removed once I start the IndexCreationTool. Therefore it makes no sense to me why the data is being looked for in the WorkDir or why the data was not previously copied there.

Steps to reproduce

  1. Build IndexCreationTool.exe

  2. Check out "https://github.com/microsoft/winget-pkgs" and copy manifests you'd like to use (including structure) to C:/Temp/PrivateStore/winget-poc/manifests. e.g 7zip

  3. Create a source.json file `{ "WorkingDirectory": "C:/Temp/PrivateStore/WorkDir",

"AppxManifest": "C:/Temp/PrivateStore/AppxManifest.xml",

"LocalManifests": [ "C:/Temp/PrivateStore/winget-poc/manifests" ],

"Signature": { "CertFile": "Cert.pfx", "Password": "*****", "Publisher": "CN:ThousandSunny" } }`

  1. Download https://winget.azureedge.net/cache/source.msix and extract the AppxManifest.xml to C:/Temp/PrivateStore/AppxManifest.xml (no example was provided, I had to start somewhere)

  2. Execute the IndexCreationTool C:\Temp\PrivateStore\IndexCreationTool>IndexCreationTool.exe -f C:\Temp\PrivateStore\IndexCreationTool\source.json

  3. Receive the error: Could not find a part of the path 'C:\Temp\PrivateStore\WorkDir\7\7zip\7zip\22.00\7zip.7zip.installer.yaml'.

Expected behavior

Manifest files are not being taken from WorkDir but from "LocalManifests" directory or they are copied to WorkDir on time

Actual behavior

Data in WorkDir is removed on application startup. No data is found within the WorkDir causing error below:

Could not find a part of the path 'C:\Temp\PrivateStore\WorkDir\7\7zip\7zip\22.00\7zip.7zip.installer.yaml'.

Environment

Windows 10
VS Professional 2022 17.8.7

JohnnyElvis avatar Feb 20 '24 13:02 JohnnyElvis

Hi, just wanted to ask if you need additional information and if you can suggest a workaround :)

JohnnyElvis avatar Mar 12 '24 14:03 JohnnyElvis

I can repro the issue. It is due to a refactor which moved all core logic of index creation into WingetSourceCreator, and IndexCreationTool was not updated to call WingetSourceCreator correctly. I'll work on a fix sometime later this month. Thanks.

yao-msft avatar Mar 12 '24 18:03 yao-msft

Hi, I just want to follow up on the progress :)

JohnnyElvis avatar Apr 16 '24 11:04 JohnnyElvis

@yao-msft - how are we doing?

JohnnyElvis avatar Aug 27 '24 14:08 JohnnyElvis

experiencing same issue

kfuchs2 avatar Aug 29 '24 08:08 kfuchs2