Page MenuHomeFreeBSD

Remove IGNORE for minimial pkg version and use normal dependencies.
AcceptedPublic

Authored by bdrewery on Oct 9 2014, 4:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 21, 12:44 PM
Unknown Object (File)
Mar 6 2024, 9:28 AM
Unknown Object (File)
Feb 12 2024, 5:51 AM
Unknown Object (File)
Jan 31 2024, 1:34 PM
Unknown Object (File)
Jan 15 2024, 11:43 PM
Unknown Object (File)
Dec 20 2023, 1:14 AM
Unknown Object (File)
Nov 14 2023, 3:34 PM
Unknown Object (File)
Oct 1 2023, 9:38 PM
Subscribers

Details

Reviewers
bapt
Group Reviewers
portmgr
Summary

This is intended to address https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193844

This results in:

~/svn/ports/sysutils/beadm # make

> License BSD2CLAUSE accepted by the user

> Found saved configuration for beadm-1.1_1

> beadm-1.1_2 depends on package: pkg>=1.3.9 - not found

> Found pkg-1.3.8_3, but you need to upgrade to pkg>=1.3.9.

  • Error code 1

For raw ports, users will get the somewhat obscure message, but we can
improve it to also list the origin to use.

For portmaster:
It does the right thing by default.

It uses build-depends-list (which includes PKG_DEPENDS). So it already
finds that pkg is updated and tries to build it first. It does NOT
consider the version dependency at all, but it does at least build
pkg first if updated.

For portupgrade:
It does not update pkg first.

  1. It doesn't consider PKG_DEPENDS.
  2. It does not updates dependencies first by default. -R is needed.

    I consider both of these bugs and plan to fix them soon. I don't plan to commit this change until portupgrade is also fixed.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bdrewery retitled this revision from to Remove IGNORE for minimial pkg version and use normal dependencies..
bdrewery updated this object.
bdrewery edited the test plan for this revision. (Show Details)
bdrewery added reviewers: portmgr, bapt.
bdrewery edited edge metadata.

Update dependency message to include origin:

===>   Found pkg-1.3.8_3, but you need to upgrade to pkg>=1.3.9 from ports-mgmt/pkg.
bdrewery updated this object.
bdrewery updated this object.
bapt edited edge metadata.
This revision is now accepted and ready to land.Oct 9 2014, 5:10 PM

I like it.

Mk/bsd.port.mk
4487

Maybe:

Found $$pkg_info, but you need to upgrade $${dir##${PORTSDIR}/} to $$prog.";

As mentioned in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193844#c4 I propose to waive the version check, or make it non-fatal. There is no good reason NOT listing pkg as a build requisite. Warn all you want, but don't get in the user's way. There is a lot of pain involved for trying to solve a temporary problem (people having outdated pkg version) on the ports end. Let alone the expensive running of pkg all over the map just to inquire about its version. Useless complexity for little good.

In D927#14, @mandree wrote:

As mentioned in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193844#c4 I propose to waive the version check, or make it non-fatal. There is no good reason NOT listing pkg as a build requisite. Warn all you want, but don't get in the user's way. There is a lot of pain involved for trying to solve a temporary problem (people having outdated pkg version) on the ports end. Let alone the expensive running of pkg all over the map just to inquire about its version. Useless complexity for little good.

You clearly don't understand the point. Removing the version check would break ports and give us no path forward for ever adding new features. We added the version check exactly to address POLA problems with people running pkg-1.1 and 1.2 still and not being able to handle the manifest format. 1.3.8 introduced @dir which older versions could not handle. Even if we released a pkg with @dir and waited a YEAR before using it in a single port, we would have people finding they can't build ports before of "unknown keyword @dir". So we have a minimum check that is more clear immediately that they must upgrade. Really, we have people running pkg-1.1 and 1.0 still and sending in reports that caused us to add the minimum version check.

The original two sins were:

  1. to inflict pkg on the world outside of any base system cadence (schedule), and now we even advance to force people to upgrade pkg out of cadence.
  2. to add features in patchlevel releases.

We must not do that to our users. We must accept that users may have other goals than to keep running after the ports@ fad of the day.
I myself am considering tossing in the towel on ports@ because following all the pkg madness in ports to stay on top of things is taking so much time I haven't nontrivial work on any other project since this stage stuff started. Other people have already quit, and I think more may follow, but that's just invoking a fallacy, so disregard this half-sentence.

We exerted co"workers" (ports maintainers and committers) with this stage stuff that offered immediately-palpable value.
And now we're doing gratuitous changes like @dir which is a minor syntax detail over @dirrmtry. We could easily offer this, and translate it to @dirrm and @exec mkdir for a few months, perhaps even conditionally on pkg version. And force people to upgrade to some pkg minor version in line with FreeBSD releases or end-of-life dates. Now we're rushing and forcing and bullying people and getting in their way. This isn't fun, it's an enormous amount of work for little and invisible good. We're forcing people away from certain pkg-plist syntax and make them move the interesting stuff into pkg-install.

We're not getting any more control unless we take pkg-[de]install scripts away, but we're forcing people to change pkg-plist and Makefiles all the time for little good.