Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 214380 - net-analyzer/metasploit-2.7 wrong pkg_postrm instructions
Summary: net-analyzer/metasploit-2.7 wrong pkg_postrm instructions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-23 14:47 UTC by Denilson Sá Maia
Modified: 2008-03-26 10:32 UTC (History)
1 user (show)

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 Denilson Sá Maia 2008-03-23 14:47:15 UTC
In package net-analyzer/metasploit-2.7, we can read these lines:

pkg_postinst() {
        elog "To update metasploit modules run:"
        elog " # cd /usr/lib/metasploit && svn update"
}
pkg_postrm() {
        if [[ -d /usr/lib/metasploit ]] ; then
                ewarn "If you ever updated modules emerge will keep /var/lib/metasploit"
                ewarn "directory. Thus to remove metasploit completely do not forgive to:"
                ewarn " # rm -r /var/lib/metasploit"
        fi
}

Note that postinst talks about /usr/lib/metasploit. Note also that postrm checks for this directory. However, the ewarn instructions talk about /var/lib/metasploit, which is wrong (and this directory does not even exist).

This is trivial to fix.
Comment 1 Peter Volkov (RETIRED) gentoo-dev 2008-03-23 16:02:14 UTC
Thank you for report. Fixed in CVS.
Comment 2 Anton Bolshakov 2008-03-25 05:50:36 UTC
Actually, there are two more small things in the postinst sections which you should be fixed:

The message is:
 * <rev> installed. For example, if you run
 *  # mkdir /etc/portage/env/net-analyzer
 *  # echo "ESVN_REVISION=HEAD" >> /etc/portage/env/${CATEGORY}/${PN}
 * each time you reemerge metasploit it'll be updated to get all possible

Problems:
1. mkdir should use -p to create parent directories
2. It's not clear what should be the name of ${CATEGORY}/${PN} directories

Solution:
2. replace ' with " so the value of $ variables would be displayed instead.

Please reopen the bug :)
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2008-03-26 10:32:37 UTC
Anton, thank you for report. Should be fixed in CVS now. BTW, please, next time open new bug. There is always possibility to loose such reports.