Upgrade just the dependencies of a port

Is there a way to upgrade just the dependencies of a particular port using portmaster or system tools?

Let's use the example of gettext - I've upgraded gettext using a binary package:
# pkg_add -r gettext

How can I upgrade the dependencies, but not gettext itself?
 
If you use portmaster something like this will do the trick:
# portmaster -r gettext -x gettext
 
SirDice said:
If you use portmaster something like this will do the trick:
# portmaster -r gettext -x gettext

This doesn't work as expected:
Code:
# portmaster -r gettext -x gettext

===>>> Currently installed version: gettext-0.18
===>>> Port directory: /usr/ports/devel/gettext

===>>> Gathering distinfo list for installed ports

===>>> Launching 'make checksum' for devel/gettext in background
===>>> Gathering dependency list for devel/gettext from ports
===>>> Starting recursive 'make config' check
===>>> Recursive 'make config' check complete for devel/gettext
===>>> Checking ports that depend on gettext-0.18

===>>> Launching child to update bash-4.1.5_2
        gettext-0.18 >> bash-4.1.5_2
<snip much output>
Code:
===>>> Done checking ports that depend on gettext-0.18


===>>> The following actions will be taken if you choose to proceed:
        Upgrade gettext-0.18 to gettext-0.18_1
        Re-install bash-4.1.5_2
<etc>

You can see that portmaster still wants to upgrade gettext.
 
For a single port (bash?)
Code:
cp -iv /usr/local/lib/libintl.so.8 /usr/local/lib/compat
/bin/rm -v /usr/local/lib/libinitl.so.8
cd /usr/ports/shells/bash
/bin/rm -rf work
pkg_delete -f /var/db/pkg/bash-[number] && make install
More complex methods maybe hackable from the manpage of
portmaster. This method I quoted would become
unworkable with too many .so. files to copy (IF that
was the principal thing installed by the port). And
one would have to remember to later remove the
libintl.so.8...
.......................
I can see using this method for slower-than-usual
upgrades of gettext, png, jpeg, curl... etc but
if you have a specific reason as to the first post
in this thread someone may have a better idea.
 
It's not one port - it's every port that depends on gettext.

libintl.so.8 doesn't exist. If I symlink libintl.so.9 (which does exist) to libintl.so.8 I still get the same issue.
 
And the ultimate aim?
1... backup v8, install v9, upgrade dep, deinstall 9
.... restore v8
2... rename v8 to v9, upgrade, rename v9 to v8
3... ???
The issue seems to be the aim of upgrading dependencies
without the port itself. I cannot think of a reason why
one would want to do so, however, there would be usually
multiple (not easy) ways. Someone posting a more
informative answer may want much more information.
 
jb_fvwm2 said:
And the ultimate aim?
1... backup v8, install v9, upgrade dep, deinstall 9
.... restore v8
2... rename v8 to v9, upgrade, rename v9 to v8
3... ???
The issue seems to be the aim of upgrading dependencies
without the port itself. I cannot think of a reason why
one would want to do so, however, there would be usually
multiple (not easy) ways. Someone posting a more
informative answer may want much more information.

This thread contains the reason for my question.
 
Ah, php5, maybe see the long recent threads in
the freebsd-questions list. Way more complex
than my answer. And still no information about
which explicit ports you want to (upgrade) and
(ignore upgrade). Also, see UPDATING re:
libtool
php
 
jb_fvwm2 said:
Ah, php5, maybe see the long recent threads in
the freebsd-questions list. Way more complex
than my answer. And still no information about
which explicit ports you want to (upgrade) and
(ignore upgrade). Also, see UPDATING re:
libtool
php

The exact ports don't actually matter - what matters is the method to do so. As the thread mentioned you'll see that it's the gettext upgrade that broke stuff - so installing gettext from packages and then building dependant ports without rebuilding gettext was a theory I had in getting rid of the error
Code:
libtool: link: unknown library version type `freebsd-'
 
Why from packages, why not from ports; and which
version was the package? You could use the
+REQUIRED_BY from /gettext-/ in /var/db/pkg,
(after pkgdb -u ; pkgdb -F) *maybe* as fed to
portmaster (example at bottom of its man page). Though I say
maybe because no time to think here about
whether it would work without error or unwanted effect.
 
You could use the
+REQUIRED_BY from /gettext-/ in /var/db/pkg,
(after pkgdb -u ; pkgdb -F) *maybe* as fed to
portmaster (example at bottom of its man page). Though I say
maybe because no time to think here about
whether it would work without error or unwanted effect.
That's interesting - may have to look into that.

I ended up fixing the root issue by moving /usr/bin/objformat out of the way - figured this out by over two days of searching and ended up finding this message

I thi^H^H know, since the system in question has never been reinstalled since FreeBSD4.4 (only upgraded) there is a lot of cruft floating around. In 8.0, /usr/bin/objformat does not get installed.

I don't think I've ever done make delete-old from single-user mode either ....

Lesson learned there!
 
Back
Top