Bug 240718 - ports-mgmt/poudriere: testport -P causes false failures, left over "@dir /prefix"
Summary: ports-mgmt/poudriere: testport -P causes false failures, left over "@dir /pre...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bryan Drewery
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-20 22:58 UTC by Matthias Andree
Modified: 2020-09-19 08:19 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (bdrewery)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Andree freebsd_committer freebsd_triage 2019-09-20 22:58:41 UTC
With ports as of r512417, 
it seems that testport -P is useless because on several ports I get "@dir /prefix" flagged as leftover, which it isn't - the prefix is normally outside of a port's scope, and flagging a root directory seems pointless to me. One other port is graphics/rawtherapee, but I've not bothered beyond two ports.

[00:00:28] [120amd64-svn] [1/1] Deinstalling bogofilter-1.2.5.r1_1...
[00:00:28] [120amd64-svn] [1/1] Deleting files for bogofilter-1.2.5.r1_1: .......... done
[00:00:28] ===========================================================================
[00:00:28] =>> Checking for extra files and directories
[00:00:28] =>> Error: Files or directories left over:
[00:00:28] @dir /prefix
[00:00:28] =>> This test was done with PREFIX!=LOCALBASE which may show failures if the port does not respect PREFIX.
Comment 1 Matthias Andree freebsd_committer freebsd_triage 2020-09-18 09:34:59 UTC
this issue persists.
Comment 2 Marc 2020-09-18 16:50:43 UTC
MARKED AS SPAM
Comment 3 Matthias Andree freebsd_committer freebsd_triage 2020-09-18 17:42:49 UTC
(In reply to Marc from comment #2)
This comment #2 is utter nonsense.
Comment 4 Matthias Andree freebsd_committer freebsd_triage 2020-09-19 08:17:46 UTC
This needs to be fixed in FreeBSD proper, not in upstream poudriere, per the comments in https://github.com/freebsd/poudriere/issues/787
Comment 5 Matthias Andree freebsd_committer freebsd_triage 2020-09-19 08:19:05 UTC
For simplicity, I'll quote Bryan's comments from Github:

"The script that checks for leftovers is in ports too. Mk/Scripts/check_leftovers.sh."

"src/share/poudriere/testport.sh:[ ${NOPREFIX} -ne 1 ] && PREFIX="${BUILDROOT:-/prefix}/`echo ${PKGNAME} | tr '[,+]' _`"

I suppose it is a problem that we really have PREFIX=/prefix/$PKGNAME so check_leftovers.sh doesn't know it should deal with the parent directory of /prefix.

I'm not sure what the right fix is here but I still think it's a Ports problem. We should probably ignore parent directories in check_leftovers.sh when PREFIX!=LOCALBASE."