Page MenuHomeFreeBSD

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

Authored by 0mp on Dec 22 2020, 3:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 5, 11:03 PM
Unknown Object (File)
Fri, Nov 22, 11:07 AM
Unknown Object (File)
Tue, Nov 19, 6:39 PM
Unknown Object (File)
Oct 28 2024, 8:39 PM
Unknown Object (File)
Oct 25 2024, 3:52 PM
Unknown Object (File)
Oct 25 2024, 3:52 PM
Unknown Object (File)
Oct 25 2024, 3:42 PM
Unknown Object (File)
Oct 24 2024, 4:40 AM
Subscribers

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

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

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No 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!

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
1026