prevent install/upgrade of port dependency

Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software).

prevent install/upgrade of port dependency

Postby Beeblebrox » 20 Mar 2011, 11:17

I have come accross and posted threads about this problem many times, but have not as yet satisfactorily solved the issue. The problem mostly arises when building an aglomerated port (like[FILE] gnome2, gnome-2-fifth-toe[/FILE]) which only serves to pull-in a series of other ports. The problem also persists when trying to upgrade or re-build the ports ([FILE]portmaster -af[/FILE])

As an example from my specific situation, [FILE]gnome2-fifth-toe[/FILE] pulls in [FILE]net/straw[/FILE] but the port is marked [FILE]DEPRECIATED[/FILE], while [FILE]gnome2-power-tools[/FILE] pulls in [FILE]thefish[/FILE] which is marked [FILE]BROKEN[/FILE]. These ports break the install or re-build process.

I have found these 2 solutions, but they do not work in a consistent manner:
1. go to [FILE]/var/db/pkg/port-name[/FILE] and
[CMD=" "]touch +IGNOREME[/CMD]
this did work for [FILE]thefish[/FILE] but not for [FILE]straw[/FILE]. I suspect this is due to the fact that when initially installing [FILE]gnome2[/FILE], as a work-around I had installed this [FILE]port[/FILE] as a package ([FILE]pkg_add[/FILE]) and this [FILE]port[/FILE] therefore had a folder in [FILE]db/pkg[/FILE]. However, the other [FILE]port[/FILE] is not yet installed on the system and I manually created the folder for [FILE]port-version[/FILE] and placed the [FILE]+IGNOREME[/FILE] in there. This is probably why the trick did not work for [FILE]straw[/FILE].

2. Edit the [FILE]Makefile[/FILE] - this does not work well, as you subsequently start getting pretty messages like:
Code: Select all
pkg_info: the package info for package '[color="Purple"]xyz[/color]' is corrupt
[: -le: argument expected
[: -le: argument expected


I'm pretty sure there is a more elegant solution than just running [FILE]portmaster -x[/FILE] with exclude flags; any update process which aborts and has to be re-started by adding -x flags until you have all the necessary excludes in place (iterative process) is foolish!
11-CURRENT_amd64_root-on-zfs_RadeonKMS
User avatar
Beeblebrox
Member
 
Posts: 838
Joined: 03 Sep 2010, 04:45

Postby Beeblebrox » 23 Mar 2011, 16:48

Solution:
The [FILE]+IGNOREME[/FILE] method in [FILE]/var/db/pkg/port-name[/FILE] works, but for ports not-yet installed or which you do not want installed, you must add a [FILE]+CONTENTS[/FILE] file in the same folder. The file is prepared by first looking in the [FILE]Makefile[/FILE] for the port and getting the portname + version number.

So as an example, [FILE]+CONTENTS[/FILE] for [FILE]straw[/FILE] would be placed in a folder named [FILE]straw-0.27[/FILE] and would consist of:
Code: Select all
@comment PKG_FORMAT_REVISION:0.27
@name straw-0.27
@comment ORIGIN:net/straw

Place into the file corresponding information for the 3 lines about the port, you can (and should) leave all [FILE]@depends[/FILE] variables blank, and there you have it - no more errors or "install missing port" requests

p.s: after you do this, run [CMD=" "]portmaster --check-depends[/CMD]
11-CURRENT_amd64_root-on-zfs_RadeonKMS
User avatar
Beeblebrox
Member
 
Posts: 838
Joined: 03 Sep 2010, 04:45

Postby wblock@ » 23 Mar 2011, 18:18

Messing with [file]/var/db/pkg[/file] entries seems fragile and likely to cause problems down the road. What do the GNOME maintainers say about the broken and deprecated (no "i") ports? Are there PRs for the problems?
User avatar
wblock@
Old Fart
 
Posts: 10167
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy


Return to Installation and Maintenance of FreeBSD Ports or Packages

Who is online

Users browsing this forum: No registered users and 3 guests