Summary: | [Future EAPI] newins et al. should accept "-" for standard input | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | Ulrich Müller <ulm> |
Component: | PMS/EAPI | Assignee: | PMS/EAPI <pms> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | in-eapi-5 | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 174380 | ||
Attachments: | Patch that implements the feature in Portage |
Description
Ulrich Müller
2009-03-24 06:53:22 UTC
For the record: An alternative proposal is to have a new helper for that. Quoting ciaranm for that: *snip* There's a slightly different variation in exheres-0: as well as do* and new*, there's also here*, which you use like this: hereins foo <<'END' stuff END It magically barfs, rather than hanging indefinitely, if you forget to give it some input. The rationale for giving it a new name rather than overloading an existing one is that some of the existing do* utilities don't take just a single simple filename, so overloading would make the command line somewhat convoluted. *snip* (In reply to comment #1) > The rationale for giving it a new name rather than overloading an > existing one is that some of the existing do* utilities don't take just > a single simple filename, so overloading would make the command line > somewhat convoluted. As I already said in -dev, my proposal is only for the new*, but _not_ for the do* commands: | It doesn't make much sense to specify "-" as an argument for "do*", | because the command would not know under which name the file should be | installed. OTOH, all "new*" commands have exactly two arguments, so we | could allow "-" for the first argument. Created attachment 321436 [details, diff]
Patch that implements the feature in Portage
Patch for Portage is attached. Please review.
(In reply to comment #3) > Created attachment 321436 [details, diff] [details, diff] > Patch that implements the feature in Portage > > Patch for Portage is attached. Please review. Looks good. I've committed a rebased version of your patch here (much smaller since new* helpers are now symlinks to newins): http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ffe2a5b5f70be05565b5a3038637805319088743 |