Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 851726 - app-editors/nano incorrect sed in ebuild src_install
Summary: app-editors/nano incorrect sed in ebuild src_install
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal trivial
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-13 15:36 UTC by Jonathan Plews
Modified: 2022-07-09 20:52 UTC (History)
2 users (show)

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


Attachments
modified nano 6.3 ebuild (nano-6.3.ebuild,3.36 KB, text/plain)
2022-07-09 20:52 UTC, Jonathan Plews
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Plews 2022-06-13 15:36:43 UTC
The sed command in src_install replaces more lines that it needs to, TIL it can be fixed with just a '0,'

-e '0,/^# include /s:# *::'

Reproducible: Always

Steps to Reproduce:
1. emerge nano
Comment 1 Larry the Git Cow gentoo-dev 2022-06-14 15:49:09 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d52b5ff9bca3e3752cba40050ec0dffe7f2abc1e

commit d52b5ff9bca3e3752cba40050ec0dffe7f2abc1e
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2022-06-14 15:47:41 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2022-06-14 15:49:00 +0000

    app-editors/nano: Don't uncomment all include lines in nanorc
    
    Thanks-to: Jonathan Plews <pl3w5y@tuta.io>
    Closes: https://bugs.gentoo.org/851726
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 app-editors/nano/{nano-6.2.ebuild => nano-6.2-r1.ebuild} | 2 +-
 app-editors/nano/{nano-6.3.ebuild => nano-6.3-r1.ebuild} | 2 +-
 app-editors/nano/nano-9999.ebuild                        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
Comment 2 Larry the Git Cow gentoo-dev 2022-06-14 17:22:19 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9318243660ec9c508d29b99ba666513462b063b2

commit 9318243660ec9c508d29b99ba666513462b063b2
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2022-06-14 17:17:49 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2022-06-14 17:22:14 +0000

    Revert "app-editors/nano: Don't uncomment all include lines in nanorc"
    
    This reverts commit d52b5ff9bca3e3752cba40050ec0dffe7f2abc1e.
    It breaks startup of nano:
    
      Error in /etc/nanorc on line 39: Unknown option "brackets"
      Error in /etc/nanorc on line 83: Unknown option "magic"
      Error in /etc/nanorc on line 128: Unknown option "punct"
      Error in /etc/nanorc on line 135: Unknown option "quotestr"
      Error in /etc/nanorc on line 190: Two single-column characters required
    
    Bug: https://bugs.gentoo.org/851726
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 app-editors/nano/{nano-6.2-r1.ebuild => nano-6.2.ebuild} | 2 +-
 app-editors/nano/{nano-6.3-r1.ebuild => nano-6.3.ebuild} | 2 +-
 app-editors/nano/nano-9999.ebuild                        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2022-06-14 17:22:53 UTC
Reopening. This broke startup of nano (see revert commit message)
Comment 4 Jonathan Plews 2022-06-15 13:36:43 UTC
There is probably a helpful way of using Portage that I'm not aware of, between that and trying various commands I've just not checked the right files, very sorry.

I research this for awk and tested it with the sample config in a fresh directory and checked with diff. The quote and path isn't strictly needed but even with using a . for the " it seems reasonable.

awk -i inplace 'NR==1,/^# include /{sub(/^# include .\//,"include \"/")} 1' nanorc

diff nano-6.3/doc/sample.nanorc nanorc
243c243
< # include "/usr/local/share/nano/*.nanorc"
---
> include "/usr/share/nano/*.nanorc"


How about also adding autoindent, tabsize 4, positionlog and smarthome as defaults too? Of the options they seem appropriate to making nano optimally useable, along with some einfo about searching, zero and minibar etc could be informative for users too. This would be a a reason for me to read up on Portage and provide patches to fully tested ebuilds too.

Regards
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-15 14:02:14 UTC
(In reply to Jonathan Plews from comment #4)
> There is probably a helpful way of using Portage that I'm not aware of,
> between that and trying various commands I've just not checked the right
> files, very sorry.
> 

It's on people committing to check but mistakes happen. In future, any fixes shouldn't be committed directly to stable anyway.
Comment 6 Jonathan Plews 2022-07-09 20:52:58 UTC
Created attachment 790799 [details]
modified nano 6.3 ebuild

the initial replace  is fixed

nanorc use flag enables some nice things

there seemed to be some unnecessary messing around with html files that I removed