tech-pkg archive

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

Re: lintpkgsrc important changes RFC (Was: lintpkgsrc 'Out of memory!' error)



On 09/03/12 09:10, David Brownlee wrote:
[---]
> At this point I would suggest:
> 
> - "Installed package options" (-i -u) should die (they are better
> covered by pkg_chk)

   Some of us have scripts which rely heavily on "lintpkgsrc -i". Is
there an equivalent option in pkg_chk already? If so, what is it? If
not, could removal of "-i" be postponed until there's an alternative?

   I like digital bling, so I like doing this:

---------
generate_graphs()
{
        MISSTOOL=
        LINTCMD=`command -v lintpkgsrc`
        DEPCMD=`command -v pkgdepgraph`
        DOTCMD=`command -v dot`

        if [ -z "$LINTCMD" ]; then
                MISSTOOL="lintpkgsrc $MISSTOOL"
        fi

        if [ -z "$DEPCMD" ]; then
                MISSTOOL="pkgdepgraph $MISSTOOL"
        fi

        if [ -z "$DOTCMD" ]; then
                MISSTOOL="dot $MISSTOOL"
        fi


        if [ -z "$MISSTOOL" ]; then

                echo
                echo "Updatable packages:"
                $LINTCMD -i | tee /tmp/outdated_packages

                if ! [ -d /tmp/graphs ]; then
                        mkdir -m 750 /tmp/graphs
                fi

                nice -n 20 $DEPCMD -D /tmp/outdated_packages > /tmp/delete
                nice -n 20 $DEPCMD -R /tmp/outdated_packages > /tmp/rebuild

                nice -n 20 pkg_admin audit > /tmp/vulnlist.$$

                cat /tmp/outdated_packages /tmp/vulnlist.$$ > 
/tmp/pkgdepgraph.in.$$
                nice -n 20 $DEPCMD -L /tmp/pkgdepgraph.in.$$ > \
                        /tmp/graphs/outdated_and_vuln_packages.dot
                nice -n 20 $DOTCMD -Tps 
/tmp/graphs/outdated_and_vuln_packages.dot > \
                        /tmp/graphs/outdated_and_vuln_packages.ps

                rm /tmp/pkgdepgraph.in.$$
                rm /tmp/vulnlist.$$

        else

                echo "Unable to generate graphs -- missing tool(s): $MISSTOOL" 
1>&2

        fi
}
---------

   More importantly, I have an "update_packages" script which needs
"lintpkgsrc -i" to be available.

-- 
Kind regards,
Jan Danielsson


Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index