On Fri, 21 Sep 2007 20:30:15 +0200, Hisham Muhammad <[EMAIL PROTECTED]> wrote:

> On 9/21/07, Jonas Karlsson <[EMAIL PROTECTED]> wrote:
>> 2007/9/21, Hisham Muhammad <[EMAIL PROTECTED]>:
>> > On 9/20/07, Jonas Karlsson <[EMAIL PROTECTED]> wrote:
>> > > I have written a small script (see below) to find what applications
>> > > are dependant on a given application. Before I commit it I'd like some
>> > > feedback, if there are things I can change and make better (or
>> > > differently).
>> >
>> > Looks like --specific-version is not taking version operators into
>> > account. I didn't find much use for this option.
>> >
>> With --specific-version the script will be more specific when grepping
>> though the Dependencies and BuildInformation files. It narrows the
>> hits down, but may miss dependencies, since a later version of the
>> dependency may be added since those file were created. I don't know if
>> it is really usefull, it just felt like it when I wrote the script.
>>
>> > Cross-checking with ldd will cause hand-added dependencies to be
>> > missed. As a consequence, "CheckDependants python" missed Subversion,
>> > for example, while "CheckDependants --fast python" got it.
>> >
>> > On the other hand, when checking a non-Current version of GTK+, --fast
>> > got it wrong and the slow mode got it right.
>> >
>> > My suggestion is to make the "fast" mode the default when no version
>> > is given. When a version is given, the cross-check should skip the
>> > dependency only if the dependency is returned by ldd but it is not the
>> > requested version. May cause the odd false-positive, but it's better
>> > than missing hand-added dependencies.
>> >
>> Besides changing default to '--fast' when no version is given, what is
>> the difference from the original implementation?
>> Another option for not missing hand added dependencies would be to
>> make a diff between Dependencies and BuildInformation and not run the
>> cross-check for entries only in the Dependencies file.
>>
>> > Here's a version with the suggested changes:
>> > http://hisham.gobolinux.org/CheckDependants
>>
>> Why is the grep at the end of the pipe split? Unecessary imo.
>
> Because it implements the other feature I mentioned: "cross-check
> should skip the dependency only if the dependency is returned by ldd
> but it is not the requested version."
>
That's how it was done before as well.

> This improves the full scan. The new version no longer misses
> Subversion when checking dependants of Python, and it is still able to
> correctly identify that my old version of GTK+ is not really used.
>
But that's due to not using the cross-check, not because you split the
grep expression.

>> And with
>> the last regex for grepping for the version, one miss the feature of
>> just checking for major version or major + minor version, and skipping
>> bugfix releases and below.
>
> It was not a feature, it was a bug. For example, I checked dependants
> of "GTK+ 2.10.1" to see if I could delete it and keep only the newer
> GTK+ 2.10.14, it returned a lot of false hits.
>
For me it was a feature. How about checking if the version specified
exists and if so, add '$' to the end of the grep expression, otherwice
just leave it?

-- 
/Jonas

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
_______________________________________________
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to