SystemLink

cancel
Showing results for 
Search instead for 
Did you mean: 

Use the NI feeds to find package dependencies

Hi there,

 

This is not a specific SystemLink issue but I figured there are a lot more here about NIPM than anywhere else on the forums...

I'm looking into how to efficiently distribute packages. I have packages that depends on NI stuffs (namely, the RTE and NI-XNET). I created my feed, added my packages.

Obviously they install fine on my dev PC but not on a fresh machine (that only runs NIPM), where it asks for the RTE and XNET... I certainly can install these manually from the Available Products in NIPM but I don't want to go this way. I don't want to explicitly add all the dependencies packages to my feed as it will be really heavy and not maintainable in the long term.

 

Now, how can I "force" my package to point to the NI feed so it can download the NI dependencies from there?

I notably tried to add the ni-package-manager-released-feed.nipkg to my feed but that does nothing (after all it's not one of my packages direct dependency)

 

Resource used - https://forums.ni.com/t5/NI-Package-Management/NI-Package-Management-Portal-READ-THIS-FIRST/ta-p/380... (and all outgoing links)

 

Thanks!!

--Eric

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

0 Kudos
Message 1 of 11
(2,478 Views)

There currently isn't a way to have a package installation register feeds before dependencies are calculated. For now, we have two options if we want to depend on NI released packages and have the user run a package installation.

  1. You can include the packages in your feed. This will increase the size of your feed.
  2. You can have your clients manually register the NI feeds before running your installation. 

Alternatively, you could probably put together a batch file that would install a package that registered the ni.com feeds first, and then ran the package installation which would depend on packages included in those feeds. 

-----------------------------------------------
Brandon Grey
Certified LabVIEW Architect

Message 2 of 11
(2,449 Views)

Hi Eric.M,

 

I have a few questions to make sure I correctly understand your request.  Making this better in several of NI's products is active development work so I'm looking to either confirm what we working on will satisfy your request, or figure out what we would need to modify in order to accommodate it.

  1. What tool are you using (or willing to use) to create your NI Package?
  2. Does the package you are building need to have its own link to where its dependencies are in order to meet your requirements?
  3. Is it acceptable for a Feed to be created and the feed knows where the dependencies are?  Effectively, adding the Feed in NIPM could register other Feeds where the needed packages can be found.
  4. Are you willing to build an "offline installer"? (offline installers would include installing NIPM to systems where it doesn't yet exist and then adding some feeds and installing some packages)
    • It seems clear from your initial posting that you don't want to actually INCLUDE all of your packages dependencies in what you build as that would be too large.  This is acceptable in some cases but I just want to confirm that you would never find this option acceptable

- Eric Reffett

Message 3 of 11
(2,448 Views)

To expand on the alternative method of using a batch file...

 

If you have already created a feed with the package(s) you want to install and NI Package Manager is installed on the target computer, you could run a batch file on the target computer that does the following via the NIPM command-line interface (CLI):

  1. Register feed(s).
  2. Update/refresh the list of available packages because you've added a feed.
  3. Install package(s).

As an example, the contents of your batch file (e.g. registerfeed_and_installpackage.bat) could look like this:

"c:\Program Files\National Instruments\NI Package Manager\nipkg.exe" feed-add --name="My Feed" "\\mynetwork\Feeds\My Feed"
"c:\Program Files\National Instruments\NI Package Manager\nipkg.exe" update
"c:\Program Files\National Instruments\NI Package Manager\nipkg.exe" install --accept-eulas -y my-package-name

 

For more information on the NIPM CLI, click here.

 

0 Kudos
Message 4 of 11
(2,442 Views)

Thanks for the replies guys.

 

@Brandon: I've been looking for something like that (automating the registration of NI feeds from a package or CLI) as a workaround... Not so user friendly but at least it would work! I would call it the "Good" solution.

Do we have an accessible list of the NI's feeds URLs for common RTEs and drivers?

 

@EricR

I'll be building packages with LabVIEW (Current Gen, and probably NXG in the near future).

As the package builder automatically detects what are the recommended dependent packages, I don't want to bother searching and finding/registering these dependencies if they're NI packages. Basically, I want my package to automatically search (by order):

1. in the same feed as my package

2. in the other feeds registered in the NIPM application running the .nipkg file

3. in other NI feeds/repos (even if they're not already added as feeds in NIPM)

The first two already work but to me we're missing #3. That would be the "Best" solution that relates to what you mentioned "Effectively, adding the Feed in NIPM could register other Feeds where the needed packages can be found."

Building an offline installer could be an option sometimes but I don't want it to be the preferred way to go. And for this offline option, I would take the action of gathering all the dependencies and add them my custom feed. That is doable as of now so I don't have questions regarding this Smiley Wink

 

@Allen:

I'm not 100% sure how that would help detecting/registering/installing NI dependencies.

I'm pretty sure that running your commands on a fresh machine where there is no RTE/drivers (and no feed registered except NIPM one) results in an error as NIPM is unable to find NI's feeds on its own.

 

Thanks!

--Eric

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

Message 5 of 11
(2,427 Views)

We don’t have a published list of feeds that we put out but you should be able to get the list of feeds from NI Package Manager. 

-----------------------------------------------
Brandon Grey
Certified LabVIEW Architect

0 Kudos
Message 6 of 11
(2,413 Views)

@Eric.M,

 

Thank you for the confirmation.

 

LabVIEW CG will likely only have the ability to create a "complete" offline installer initially.  LabVIEW NXG will have additional functionality.  We will likely add the ability to create "partial installers" like you suggest with future releases as we iterate on the growing needs from users with how they use  packages.

 

As Brandon said, we don't have a published list of NI feeds, but you can figure them out by installing things from the "Browse Products" tab in the NIPM GUI.  Each item in this view will add Feeds to your NIPM list of known feeds.  NI didn't want to just add "all known NI feeds" to the environment from the beginning because that would be overkill for a lot of NI customers.  I suppose we could build a service that you could query to get the list of known feeds but we don't have that right now.  Instead, we rely on users to pick the item from the "Browse Products" list and then we add the specific feeds for those products.

 

Do you consider this "all known NI Feeds" query browser to be a "must have" feature?  It seems more like something that is nice to have as opposed to mission critical, but maybe I don't entirely understand the use case.

 

0 Kudos
Message 7 of 11
(2,397 Views)

Well no it's not technically a critical feature request, but for alliance partners who are going to use NIPM more and more frequently, it'd be a really nice tool, so we are not necessarily forced to download stuffs individually from the available products section before building packages and feeds.

 

Do you guys want me to add an idea exchange so you get a better idea of the scope (admittedly I'm not the only one to want that ^^)?

 

--Eric

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

0 Kudos
Message 8 of 11
(2,391 Views)

NI folk:

Eric definitely isn't the only one to want that functionality. Every other package manager I've worked with (opkg, APT, RPM, JKI's VIPM) automatically adds dependencies when you try to install the dependent package. I was very confused the first time I tried distributing a package and NIPM didn't just pull in the NI driver feeds.

 

Eric:

If you do throw this on the Idea Exchange, I can promise you a kudo from myself and at least one of my coworkers.

 

William R.
Message 9 of 11
(2,373 Views)

Good to know we're not alone in here ;D

Gonna post the idea exchange and see how it goes from there...

 

--Eric

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

0 Kudos
Message 10 of 11
(2,356 Views)