[pacman-dev] [PATCH] links problem in bacman

Dan McGee dpmcgee at gmail.com
Sun Jun 22 22:23:47 EDT 2008


On Sat, Jun 21, 2008 at 1:10 PM, Carlo Bersani <carlocci at gmail.com> wrote:
> Il Tuesday 17 June 2008 04:03:04 Dan McGee ha scritto:
>> On Mon, Jun 16, 2008 at 11:05 AM, Carlo Bersani <carlocci at gmail.com> wrote:
>> > I just discovered test -e tries to resolve the link before testing, so if
>> > the link is copied before the actual file, the script exits.
>> > Here's the simple fix to this bug:
>>
>> I'd really prefer a GIT patch...that makes it easier on my end to
>> apply and gives you the chance to write a commit message that will be
>> included in the log. Other than that the patch looks fine.
>>
>
> Sorry, I had to study how git works with coming exams
> Hope this is fine:
>
> ---
>  contrib/bacman |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/bacman b/contrib/bacman
> index 410482f..bac5d67 100755
> --- a/contrib/bacman
> +++ b/contrib/bacman
> @@ -136,7 +136,7 @@ while read i; do
>                 bsdtar -cnf - "/$i" 2> /dev/null | bsdtar -xpf -
>
>                 # Workaround to bsdtar not reporting a missing file as an
> error
> -                if [ ! -e "$work_dir"/"$i" ]; then
> +                if [ ! -e "$work_dir"/"$i" ] && [ -L "$work_dir"/"$i" ]; then
>                     echo ""
>                     echo "ERROR: unable to add /$i to the package"
>                     echo "       If your user does not have permssion to read
> this file then"
> @@ -279,4 +279,4 @@ echo Done
>
>  exit 0
>
> -# vim: set ts=2 sw=2 noet:
> \ No newline at end of file
> +# vim: set ts=2 sw=2 noet:

Not quite what I was looking for, but I don't want to keep making you
submit. Copying any pasting added spaces instead of tabs, so the patch
was rejected. You also probably just copied/pasted git diff output
rather than actually making a local commit and using git-format-patch,
which is the preferred format. But there is plenty of time to learn.
:)

It is applied locally, so thanks!

-Dan




More information about the pacman-dev mailing list