HomeFreeBSD

Fix an unfortunately long-standing bug in the --package code, we need to
rS221202Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

Fix an unfortunately long-standing bug in the --package code, we need to
update the +REQUIRED_BY files for ports that the installed port depends on.
When I tested pkg_add originally I confirmed that it did this, but I
neglected to re-test when adding the --no-deps option, which suppresses
this behavior. Mea culpa.

So take this opportunity to fix the bug, and improve some other things in
the process:

  • Add code to the section that updates dependencies for the newly installed package which walks the +CONTENTS file and runs the +REQUIRED_BY update for every port that the newly installed depends on. I may revisit this later with a more tightly focused solution, but this code is pretty fast, and at this point I'd rather be thorough.
  • Create update_required_by() to consolidate the 2 places that were doing this already, and avoid adding a 3rd above
  • Set PM_VERBOSE unconditionally for --check-depends. The functions that it uses all had code of the form [ -n "$PM_VERBOSE" -o -n "$CHECK_DEPENDS" ] which was growing increasingly pointless, and I didn't want to duplicate this in the new function. Doing it this way allows me to simplify some code quite a bit.
  • Remove a no-longer-used variable from --check-depends
  • Remove a spurious 'return 0' at the end of check_dependency_files

Details

Provenance
dougbAuthored on
Parents
rS221201: Make CAM_DEBUG_CDB also dump ATA commands in addition to SCSI.
Branches
Unknown
Tags
Unknown

Event Timeline