Use of sed in spec files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's quite common to need to do some minor manipulation in a spec file and you decide to use sed instead of patching so you don't have to update it every release.

The problem is that sed returns 0 whether it actually did anything or not. 

Thinking about this I did some searching and you can use custom exit codes[1].

The question is, does anyone think this is important? Important enough to have guidelines around? Sure it doesn't hurt anything (unless the search term is added in another context) but it does lead to spec file cruft. 

As I run across them in my packages I plan to update them.

Thanks,
Richard

[1] https://stackoverflow.com/questions/15965073/return-value-of-sed-for-no-match/15966279
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux