Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 183743 - net-analyzer/fail2ban postinst improvement
Summary: net-analyzer/fail2ban postinst improvement
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-30 16:09 UTC by Paweł Hajdan, Jr. (RETIRED)
Modified: 2007-07-05 22:50 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2007-06-30 16:09:13 UTC
fail2ban-0.8.0-r1 ebuild contains following code:

pkg_postinst() {
    elog
    elog "Configuration files are now in /etc/fail2ban/"
    elog "You probably have to manually update your configuration"
    elog "files before restarting Fail2ban!"
    elog
    elog "Fail2ban is not installed under /usr/lib anymore. The"
    elog "new location is under /usr/share."
    elog
    elog "If you are upgrading from version 0.6.x see:"
    elog "http://www.fail2ban.org/wiki/index.php/HOWTO_Upgrade_from_0.6_to_0.8"
}

IMHO some parts of it should be made conditional, at least the part about "If you are upgrading from version 0.6.x ...". It can be accomplished using has_version, according to http://devmanual.gentoo.org/ebuild-writing/functions/pkg_postinst/

So the fragment of code above would look like

if has_version '<net-analyzer-0.7'; then
        # elogs here
fi

Of course I suggest making conditional other elogs in postinst here, just I'm not sure about versions when it changed.

Rationale: when I'm updating system I often don't remember whether previous version was 0.7.x or 0.6.x etc. Of course it can be checked in emerge.log, but it would be much easier and more friendly if I could just see relevant elogs.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-06-30 16:12:31 UTC
(In reply to comment #0)
> if has_version '<net-analyzer-0.7'; then

Needs a valid atom... ;)
Comment 2 Raphael Marichez (Falco) (RETIRED) gentoo-dev 2007-07-05 22:50:39 UTC
Fixed in 0.8.0 and 0.8.0-r1, thanks