Opened 7 years ago

Last modified 3 years ago

#53851 closed enhancement

Add target that bumps version and checksum — at Version 6

Reported by: l2dy (Zero King) Owned by:
Priority: Normal Milestone: MacPorts 2.6.0
Component: base Version:
Keywords: Cc:
Port:

Description (last modified by l2dy (Zero King))

Homebrew has brew bump-formula-pr. Such functionality saves a lot of work when updating many ports. Bumping ports using PortGroup like github and bitbucket should also be supported. Existing revision should be reset or removed.

Use cases (pseudo commands):

  • port bump [[portname | pseudo-portname | port-expressions | port-url]] bumps checksums only
  • port bump [[portname | pseudo-portname | port-expressions | port-url]] @<version> bumps version and checksums
  • port bump --livecheck [[portname | pseudo-portname | port-expressions | port-url]] bumps both with livecheck result

Change History (6)

comment:1 Changed 7 years ago by Schamschula (Marius Schamschula)

Just be mindful that numerous ports have checksums for multiple files. I personally use a python script to automatically update checksums, but this script has a list of which Portfiles need to be updated manually.

comment:2 Changed 7 years ago by l2dy (Zero King)

Description: modified (diff)

Checksum for multiple files shouldn't be a problem, simply find and replace every old hash with the corresponding new one should work. Some ports have version set by custom methods so the version has to be updated manually. The Portfile have to be checked afterwards anyway.

comment:3 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

I use my portcheckup script to do this, though I have some local changes that haven't been committed yet.

Just "bumping" checksums is seldom desired; more work is needed to handle that situation correctly; see PortfileRecipes#stealth-updates.

comment:4 Changed 7 years ago by l2dy (Zero King)

In the first use case I'd bump the version manually and let port(1) update the checksum.

Take R for example, it's not viable to automate the version bump in base, but the checksum could be automatically updated.

set major 3
set minor 3
set point 3
version                     ${major}.${minor}.${point}
Last edited 7 years ago by l2dy (Zero King) (previous) (diff)

comment:5 Changed 7 years ago by l2dy (Zero King)

Description: modified (diff)

comment:6 Changed 7 years ago by l2dy (Zero King)

Description: modified (diff)
Note: See TracTickets for help on using tickets.