[pacman-dev] Fileconflict error...
Dan McGee
dpmcgee at gmail.com
Tue Jul 22 21:01:59 EDT 2008
On Tue, Jul 22, 2008 at 8:20 AM, Xavier <shiningxc at gmail.com> wrote:
> On Tue, Jul 22, 2008 at 1:31 PM, Nagy Gabor <ngaba at bibl.u-szeged.hu> wrote:
>>
>> I will go offline until evening. Cannot git be used as a testing
>> machine (with fileconflict004.py) here?
>>
>
> Hmm reading man git-bisect, this seems possible. We just need some
> scripts to return 1 when fileconflict004 fails, and 0 when it pass. It
> could be pactest directly after patching it, or just a wrapper on
> pactest which greps "PASS = 1" or something like that.
>
> Otherwise you can always manually use fileconflict004 as a test for
> doing a bisection using git, but then, it is probably faster to only
> do test before any commits related to fileconflict, rather than a
> blind testing.
>
> Anyway, I still did a git bisect with manual testing for fun, and the
> result is funny :)
Here is a bisect script I have used with pacman in the past to do it
automatically, I can't remember exactly which bug we were trying to
track down but the ideas here are solid. You need to build, setup your
test environment (if you are using pactest we really don't have to do
much), run the test, and issue the correct exit code.
#!/bin/bash
# make
make
# get setup correct
sudo rm /var/lib/pacman/sync/{community,extra,pacman-git,testing,unstable}/.lastupdate
# remove our temp file
OUTFILE=/tmp/bisectout.txt
[ -f $OUTFILE ] && rm $OUTFILE
# don't want to actually do the upgrade, just see its output
yes n | sudo ./src/pacman/pacman -Syu > $OUTFILE
# if output contains
# warning: licenses: local (2.4-1) is newer than core (2.3-1)
# then it did the wrong thing
grep -qF "warning: licenses: local (2.4-1) is newer than core (2.3-1)"
$OUTFILE && exit 1
# we didn't find our text, good revision
exit 0
>
> """"
> 584ffa6aef13d0933ad4930ab9cb70d3af2977ff is first bad commit
> commit 584ffa6aef13d0933ad4930ab9cb70d3af2977ff
> Author: Dan McGee <dan at archlinux.org>
> Date: Mon May 12 20:49:18 2008 -0500
>
> Remove an outdated exception check in file conflict code
>
> This has been around since at least pacman 2.9.8. Frugalware just dumped it
> in commit 113ec73bfcfdc, and deleting it here and running pactest shows that
> nothing that we have actually tested changes. If someone can pactest the
> edge case where this is needed, then show me the money.
>
> Signed-off-by: Dan McGee <dan at archlinux.org>
>
> :040000 040000 ea3e9f52732a5412f2e77e2a1060c3247636de7b
> a234d7e4ca725edc301f696640d897ce54dfb3b8 M lib
> """"
Hmmmmmm. So what do we need to do here? Put it back in? You guys break
my code too much. :P
-Dan
More information about the pacman-dev
mailing list