Gentoo Logo
Gentoo Spaceship

Installation:
Gentoo Handbook
Installation Docs

Documentation:
Home
Listing
About Gentoo
Philosophy
Social Contract

Resources:
Bug Tracker
Developer List
Discussion Forums
Gentoo BitTorrents
Gentoo Linux Enhancement Proposals
IRC Channels
Mailing Lists
Mirrors
Name and Logo Guidelines
Online Package Database
Security Announcements
Staffing Needs
Supporting Vendors
View our CVS

Graphics:
Logos and themes
Icons
ScreenShots

Miscellaneous Resources:
Gentoo Linux Store
Gentoo-hosted projects
IBM dW/Intel article archive




List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Zac Medico <zmedico@g.o>
Subject: Re: [RFC] New PROPERTIES=interactive value to identify interactive packages?
Date: Wed, 06 Aug 2008 22:34:37 -0700
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeremy Olexa wrote:
>> Please consider a new PROPERTIES=interactive setting that allows an
>> ebuild to indicate that it uses stdin and stdout for user
> 
> I don't think anyone will disagree with this one. The one problem that I
> see is that if the ebuild still doesn't have this value in it, portage
> will *look* like it has hung itself out to dry. I have no idea if this
> is easy to fix or not. If it is easy, then I still would like to propose
> that it gets sent to the foreground when in background mode.

We can use standard job control functions such as tcsetpgrp() to put
processes in the background and then detect when they're sent a
SIGTTIN signal in order to know that they've attempted to read from
stdin.

However, it's still useful to have PROPERTIES=interactive as a means
have knowledge of this behavior in advance, in case the user would
like to mask such ebuilds.

It also simplifies implementation details a bit if the package
manager can just grant exclusive stdio access in advance rather than
having to detect it when it happens and then having to update the
display from a saved output buffer or telling the application to
redraw itself (like dtach [1] does with Ctrl+L code) or whatnot.

> What will
> portage's behavior be when the user asks to be in background mode and
> there is an ebuild in the depgraph that has PROPERTIES=interactive?

I was planning to add some option for masking those, like
- --exclude-property=interactive or something like that. That would
mask the package so that it wouldn't be be included in the depgraph
unless it happens to be installed already.

> If
> it bails out, then the problem described above is moot (only if
> maintainers are diligent).

Like Alec said, I don't think this is a difficult thing to get right
and even if the maintainer doesn't get it right initially then it's
not something that's very difficult to spot and fix. More elusive
bugs certainly do exist. That said, I still would like to make use
of the standard job control functions to detect and handle cases
like that. However, that does not entirely preclude the usefulness
of the knowledge that PROPERTIES=interactive is intended to provide.

> -Jeremy
> 
> 

[1]
http://www.opengroup.org/onlinepubs/009695399/functions/tcsetpgrp.html
[2] http://dtach.sourceforge.net/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkiaiWwACgkQ/ejvha5XGaMTMQCfS9IoGqHN8ehDpekir2VSO1+7
ELkAn1NJp7HJIQKu0hkC+CVXd7pwWF8c
=PQwl
-----END PGP SIGNATURE-----


Replies:
Re: [RFC] New PROPERTIES=interactive value to identify interactive packages?
-- Jeremy Olexa
References:
[RFC] New PROPERTIES=interactive value to identify interactive packages?
-- Zac Medico
Re: [RFC] New PROPERTIES=interactive value to identify interactive packages?
-- Jeremy Olexa
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: [RFC] New PROPERTIES=interactive value to identify interactive packages?
Next by thread:
Re: [RFC] New PROPERTIES=interactive value to identify interactive packages?
Previous by date:
Re: Jeeves IRC replacement now alive - Willikins
Next by date:
Re: Jeeves IRC replacement now alive - Willikins


Updated Jun 17, 2009

Donate to support our development efforts.

Gentoo Centric Hosting: vr.org

VR Hosted

Tek Alchemy

Tek Alchemy

SevenL.net

SevenL.net

php|architect

php|architect

Copyright 2001-2007 Gentoo Foundation, Inc. Questions, Comments? Email www@gentoo.org.