Solved pkg: Install all dependencies EXCEPT the main package

I'm trying to update the PHP version on my www/nextcloud instance. As I use the web updater from Nextcloud itself, I "just" want to update all php dependencies "around" my Nextcloud.
Basically I want to have a list of all lang/php81 packages required by e.g. nextcloud-php81 - but NOT installing/updating Nextcloud itself via the package.

I saw an example of pkg info -dx packagename, but as far as my understanding goes this lists dependencies of already installed packages.
Does someone here have an idea of how to achieve this?
Thanks!
 
Why not simply install nextcloud-ph81 (so it also installs the required dependencies), then remove it again. That should leave all the dependencies in place until you do pkg autoremove.
 
Yes, that's what I did. I was just wondering if I could circumvent the install-deinstall loop.
Thank you.
 
Yes, that's what I did. I was just wondering if I could circumvent the install-deinstall loop.
Thank you.
One way to do that is to set up Poudriere to compile only the needed updates against the already-installed stuff. That's what I'm doing for my own project, but it is a LOT of work to line up all the details and have it working end-to-end.
 
From the port you could do make install-missing-packages, but this also installs a whole bunch of build requirements. That might be too much?

Code:
     Example 2: Installing Dependencies with pkg(8)

       The following example shows how to build and install a port without
       having to build its dependencies.  Instead, the dependencies are
       downloaded via pkg(8).

         # make install-missing-packages
         # make install

Alternatively, you could use pkg-rquery(8) to find out what the package's dependencies are. Then install the resulting list. pkg-query(8) queries your local catalog, and pkg-rquery(8) queries the remote catalog.

Edit: I think this might do it: pkg rquery '%dn' nextcloud-php81
 
Back
Top