svn commit: r348866 - head/ports-mgmt/poudriere-devel

Bryan Drewery bdrewery at FreeBSD.org
Sun Mar 23 18:11:45 UTC 2014


On 3/23/2014 12:49 PM, Adam Weinberger wrote:
> On 23 Mar 2014, at 12:20, Bryan Drewery wrote:
> 
>> On 3/23/2014 11:18 AM, Mathieu Arnold wrote:
>>>
>>>
>>> +--On 23 mars 2014 11:15:51 -0500 Bryan Drewery <bdrewery at FreeBSD.org>
>>> wrote:
>>> | On 3/23/2014 11:11 AM, Mathieu Arnold wrote:
>>> |> +--On 23 mars 2014 15:40:11 +0000 Bryan Drewery
>>> <bdrewery at FreeBSD.org>
>>> |> wrote:
>>> |> |  .include <bsd.port.options.mk>
>>> |> |
>>> |> | +post-install:
>>> |> |  .if ${PORT_OPTIONS:MZSH}
>>> |> | -PLIST_FILES+=    share/zsh/site-functions/_poudriere
>>> |> | -PLIST_DIRSTRY+=    share/zsh/site-functions
>>> |> | -PLIST_DIRSTRY+=    share/zsh/
>>> |> | -.else
>>> |> | -MAKE_ENV+=    NO_ZSH=yes
>>> |> | +    @${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions/
>>> |> | +    ${INSTALL_DATA} ${WRKSRC}/completions/zsh/_poudriere \
>>> |> | +        ${STAGEDIR}${PREFIX}/share/zsh/site-functions/
>>> |> |  .endif
>>> |>
>>> |> I think you could do without the include and always install the file.
>>> |>
>>> |
>>> | What?
>>>
>>> Replace:
>>>
>>> .include <bsd.port.options.mk>
>>>
>>> post-install:
>>> .if ${PORT_OPTIONS:MZSH}
>>>       @${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions/
>>>       ${INSTALL_DATA} ${WRKSRC}/completions/zsh/_poudriere \
>>>           ${STAGEDIR}${PREFIX}/share/zsh/site-functions/
>>> .endif
>>>
>>> With:
>>>
>>> post-install:
>>>       @${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions/
>>>       ${INSTALL_DATA} ${WRKSRC}/completions/zsh/_poudriere \
>>>           ${STAGEDIR}${PREFIX}/share/zsh/site-functions/
>>>
>>> The package won't register the file if the option is disabled, and it
>>> removes the need for make to parse bsd.port.mk twice.
>>>
>>
>> And then there is a stage orphan.
>>
>> No.
> 
> Staging only installs things listed in the plist. If the ZSH option is
> enabled, that file is in the plist. Stage orphans are files that never
> get installed, no matter which options are selected.

Right, there are no *leftovers*, but there are *orphans*. Files which
are in stagedir and never installed. I invented the whole idea of stage
orphans and checking for them in poudriere, before it was a target in
ports. Installing a file to the stagedir and never installing in the
package creates a fatal error in poudriere as an orphan. Leaving
false-positive orphans creates a very hard to maintain situation.
Someone will come along in the future and update, see orphans, and not
know if they are new or not. The point is to find files you forgot to
add to the plist.

Sorry but the stagedir cannot have orphans in it, it's not intended for
that. It's intended to make leftovers impossible and allow packaging as
non-root. Leaving untracked files in there is a big red flag that your
package is missing something. You must handle them either by not
installing them or by removing them.

People are missing this point. You must keep the stagedir clean if you
want to pass poudriere testing. Many people have been giving incorrect
advice on how to treat the stagedir and it's going to be a big problem
once we start doing daily QAT/poudriere on the tree to find leftovers
and orphans. Right now orphans are going unfound because QAT/tinderbox
doesn't check for orphans. That is a big problem right now. When staging
a port, you now have no idea if there are files missing from plist if
you are depending on QAT.

I really wish people would stop giving the awfully incorrect advice
here. People are making it into some kind of style or opinion matter,
but it's simply not the case.

There are ideas and plans to only consider an orphan as something that
is not in any plist (for subpackages), but we don't have subpackages
yet. So we are left with keeping the stagedir clean.

-- 
Regards,
Bryan Drewery

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 553 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-ports-all/attachments/20140323/72c5f88b/attachment.sig>


More information about the svn-ports-all mailing list