Page MenuHomeFreeBSD

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

Authored by 0mp on Dec 22 2020, 3:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 6, 8:42 AM
Unknown Object (File)
Wed, Nov 5, 3:45 AM
Unknown Object (File)
Thu, Oct 30, 11:10 AM
Unknown Object (File)
Sun, Oct 26, 7:32 AM
Unknown Object (File)
Fri, Oct 24, 12:46 AM
Unknown Object (File)
Thu, Oct 23, 11:45 PM
Unknown Object (File)
Sun, Oct 19, 6:03 PM
Unknown Object (File)
Oct 9 2025, 6:42 PM
Subscribers

Details

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".

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282291

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 65392
Build 62275: 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
1010

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

And also this seems that DIST_SUBDIRis duplicated.

Mk/bsd.port.mk
1010

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
1010

No worries!

I don't quite understand where the problem is.
Is the fact that there are two / sometime breaks stuff?
If this is actually the case, I'd rather the source of the second / be somewhat fixed.

Mk/bsd.port.mk
1010
0mp marked an inline comment as done.
  • Use mat's implementation
0mp marked an inline comment as done.Jul 13 2025, 9:27 AM
pizzamig added a subscriber: pizzamig.

It looks good to me

This revision is now accepted and ready to land.Jul 13 2025, 9:27 AM