Page MenuHomeFreeBSD

bsd.port.mk: Remove confusing double "/" from _DISTDIR
Needs ReviewPublic

Authored by 0mp on Dec 22 2020, 3:54 PM.

Details

Reviewers
None
Group Reviewers
O5: Ports Framework(Owns No Changed Paths)
portmgr
Summary
bsd.port.mk: Remove confusing double "/" from _DISTDIR

_DISTDIR is a variable which stores the distfiles directory of the port that is
currently being worked on. In practice, it is usually just the DISTDIR,
although some ports also define a subdirectory. Currently, a slash separating
DISTDIR from DIST_SUBDIR is added to _DISTDIR no matter if DIST_SUBDIR is set
or not. This may cause confusion to ports users by looking like a bug while it
is not.

In particular, this patch casuses diagnostic logs of failed archive extraction
to look like this:

    ===>  Failed to extract "/portdistfiles/ttf-iosevka-ss05-4.1.1.zip".

instead of this:

    ===>  Failed to extract "/portdistfiles//ttf-iosevka-ss05-4.1.1.zip".

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 35616
Build 32515: arc lint + arc unit

Event Timeline

0mp requested review of this revision.Dec 22 2020, 3:54 PM
otis added inline comments.
Mk/bsd.port.mk
1026

Couldn't it be more like: ${DISTDIR}${DIST_SUBDIR:C,//+,/,g} ?

And also this seems that DIST_SUBDIRis duplicated.

Mk/bsd.port.mk
1026

Couldn't it be more like: ${DISTDIR}${DIST_SUBDIR:C,//+,/,g} ?

And also this seems that DIST_SUBDIRis duplicated.

Sorry, disregard, please.

0mp marked 2 inline comments as done.Jan 17 2021, 1:26 PM
0mp added inline comments.
Mk/bsd.port.mk
1026

No worries!