Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#51136 closed defect (fixed)

`port pkg` and `port dmg` do not agree on how to handle the port revision

Reported by: RJVB (René Bertin) Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 2.4.0
Component: base Version: 2.3.4
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), ctreleaven (Craig Treleaven)
Port:

Description

Citing Ryan on a macports-dev thread I started (port [m]dmg and PackageMaker) :

there appears to be a bug where "port dmg" assumes that the package name does not have a revision number, but "port pkg" adds a revision number to the package name if the revision is not zero.

I would argue that both need to take the revision number into account as there is no way of knowing what the revbump covers.

Change History (5)

comment:1 Changed 7 years ago by raimue (Rainer Müller)

Please provide steps to reproduce this issue.

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

Just try to run sudo port dmg on any port whose revision is not 0, e.g.:

$ port info dosmacux
dosmacux @1.5_1 (textproc)
Variants:             universal

Description:          dosmacux provides six utilities for converting text file end-of-line characters from one operating system convention to another, while retaining file time stamps.
Homepage:             http://www.math.utah.edu/pub/dosmacux/

Platforms:            darwin
License:              public-domain
Maintainers:          Email: ryandesign@macports.org
$ sudo port -s dmg dosmacux
--->  Fetching distfiles for dosmacux
--->  Attempting to fetch dosmacux-1.5.tar.bz2 from https://distfiles.macports.org/dosmacux
--->  Verifying checksums for dosmacux
--->  Extracting dosmacux
--->  Configuring dosmacux
--->  Building dosmacux
--->  Staging dosmacux into destroot
--->  Creating pkg for dosmacux version 0_1.5_1 at /opt/local/var/macports/build/_Users_rschmidt_macports_macports-ports_textproc_dosmacux/dosmacux/work/dosmacux-1.5_1.pkg
--->  Creating disk image for dosmacux-1.5
Error: Failed to dmg dosmacux: error copying "/opt/local/var/macports/build/_Users_rschmidt_macports_macports-ports_textproc_dosmacux/dosmacux/work/dosmacux-1.5.pkg": no such file or directory
Error: See /opt/local/var/macports/logs/_Users_rschmidt_macports_macports-ports_textproc_dosmacux/dosmacux/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port dosmacux failed
$ ls -1 /opt/local/var/macports/build/_Users_rschmidt_macports_macports-ports_textproc_dosmacux/dosmacux/work/
destroot
dosmacux-1.5
dosmacux-1.5-1
dosmacux-1.5_1-component.pkg
dosmacux-1.5_1.pkg
$ 

comment:3 Changed 7 years ago by ctreleaven (Craig Treleaven)

Cc: ctreleaven added

comment:4 Changed 7 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

In 62d7125/macports-base:

Factor out filename construction in package1.0

The different targets each had their own code for constructing the names of
the pkg/mpkg/dmg/mdmg files. As well as being repeated code, this led to
incompatibility in some cases. In particular, pkg used an underscore between
version and revision, but dmg expected a dash.

All are now using one proc, portpkg::image_name.

Fixes: #51136

comment:5 Changed 7 years ago by jmroot (Joshua Root)

Milestone: MacPorts 2.4.0
Note: See TracTickets for help on using tickets.