pkgsrc-WIP-discuss archive

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

Re: Outdated wip/ packages



 >> > That reminds me, I removed an older wip package a couple of weeks ago as I
 >> > found the mainstream version had overtaken it. I wonder if anybody has an
 >> > idea to make a script that can compare versions and raise a flag for such
 >> > situations?
 >>
 >> pkgtools/pkg_notify?

> I was thinking more the case where the package in blah/example is already
> later than wip/example (and thus wip/example can probably be removed), not
> necessarily where a newer version exists (as there may be other reasons
> why it is not yet imported)

Ah. Ok. I think such tool can easily be implemented using
wip/pkg_summary-utils and wip/pkg_online-client

~/tmp/test_wip_pkg:

    #!/bin/sh

    #usage: test_wip_pkg <wip/pkgpath>

    test $# -eq 1 || exit 1

    # obtain summary for WIP package
    pkg_online_find -r -3 PKGPATH:exact:"$1" > 1.log
    # summary2pkgbase conversion
    base=`awk '/^PKGNAME=/ {$0=substr($0, 9); sub(/-[^-]+$/, ""); print}' 1.log`
    # obtain summary for package with pkgname=$pkgbase but not from WIP
    pkg_online_find -r -3 PKGNAME:exact:"$base" -PKGPATH:prefix:wip/ \
        > 2.log 2> /dev/null

    # result
    pkg_cmp_summary 2.log 1.log

How it works

    $ ~/tmp/test_wip_pkg wip/dict-server 
    < dict-server 1.9.15nb1 1.11.2
    $ ~/tmp/test_wip_pkg wip/distbb
    + distbb 0.33.0
    $

Here `<' means that pkgsrc has older package than WIP, `>' -- pkgsrc
has newer package than WIP, `+' -- pkgsrc has no package
present in WIP, `=' -- pkgsrc and WIP have the same package.
See pkg_cmp_summary(1) for other possible values.

If you want to test hundreds of packages, it makes sense to use
pkg_list_all_pkgs(1) and pkg_src_summary(1) instead of pkg_online-find(1).

-- 
Best regards, Aleksey Cheusov.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
pkgsrc-wip-discuss mailing list
pkgsrc-wip-discuss%lists.sourceforge.net@localhost
https://lists.sourceforge.net/lists/listinfo/pkgsrc-wip-discuss


Home | Main Index | Thread Index | Old Index