Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 588416 - app-admin/needrestart: should depend on >=sys-apps/sed-4.2.2
Summary: app-admin/needrestart: should depend on >=sys-apps/sed-4.2.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Craig Andrews
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2016-07-09 10:43 UTC by Coacher
Modified: 2016-07-14 01:29 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info needrestart (info,7.16 KB, text/plain)
2016-07-09 10:44 UTC, Coacher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Coacher 2016-07-09 10:43:39 UTC
Hello.

needrestart installs and uses scripts that call sed with '-z' option [1,2]. 
This option was introduced in sed-4.2.2 [3].
Thus needrestart must depend on >=sys-apps/sed-4.2.2.

Please fix.

[1]: https://github.com/liske/needrestart/blob/1a3b68a38e0691ca82e894ef591b23af666cc14d/lib/notify.d.sh#L34
[2]: https://github.com/liske/needrestart/blob/1c17aa96ed455c6f10b496fa6a5c17daf96558ac/ex/notify.d/400-notify-send#L34
[3]: http://article.gmane.org/gmane.comp.lang.smalltalk.gnu.general/7873
Comment 1 Coacher 2016-07-09 10:44:26 UTC
Created attachment 440172 [details]
emerge --info needrestart
Comment 2 Coacher 2016-07-09 10:47:54 UTC
Here's the output from `needrestart -v -m a -r l' that demonstrates the problem:
[...]
User sessions running outdated binaries:
 root @ /dev/tty7: X[2077]
[main] run /etc/needrestart/notify.d/200-write
sed: invalid option -- 'z'
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...

  -n, --quiet, --silent
                 suppress automatic printing of pattern space
  -e script, --expression=script
                 add the script to the commands to be executed
  -f script-file, --file=script-file
                 add the contents of script-file to the commands to be executed
  --follow-symlinks
                 follow symlinks when processing in place
  -i[SUFFIX], --in-place[=SUFFIX]
                 edit files in place (makes backup if extension supplied)
  -l N, --line-length=N
                 specify the desired line-wrap length for the `l' command
  --posix
                 disable all GNU extensions.
  -r, --regexp-extended
                 use extended regular expressions in the script.
  -s, --separate
                 consider files as separate rather than as a single continuous
                 long stream.
  -u, --unbuffered
                 load minimal amounts of data from the input files and flush
                 the output buffers more often
      --help     display this help and exit
      --version  output version information and exit

If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret.  All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.

GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
[/etc/needrestart/notify.d/200-write] notify user root on /dev/tty7
[main] run /etc/needrestart/notify.d/400-notify-send
sed: invalid option -- 'z'
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...

  -n, --quiet, --silent
                 suppress automatic printing of pattern space
  -e script, --expression=script
                 add the script to the commands to be executed
  -f script-file, --file=script-file
                 add the contents of script-file to the commands to be executed
  --follow-symlinks
                 follow symlinks when processing in place
  -i[SUFFIX], --in-place[=SUFFIX]
                 edit files in place (makes backup if extension supplied)
  -l N, --line-length=N
                 specify the desired line-wrap length for the `l' command
  --posix
                 disable all GNU extensions.
  -r, --regexp-extended
                 use extended regular expressions in the script.
  -s, --separate
                 consider files as separate rather than as a single continuous
                 long stream.
  -u, --unbuffered
                 load minimal amounts of data from the input files and flush
                 the output buffers more often
      --help     display this help and exit
      --version  output version information and exit

If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret.  All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.

GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
[/etc/needrestart/notify.d/400-notify-send] skip session '/dev/tty7'
[...]
Comment 3 Craig Andrews gentoo-dev 2016-07-10 01:39:55 UTC
Thank you for the excellent bug report!

https://github.com/gentoo/gentoo/pull/1859