Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Pacman Development (http://www.linux-archive.org/archlinux-pacman-development/)
-   -   links problem in bacman (http://www.linux-archive.org/archlinux-pacman-development/107811-links-problem-bacman.html)

Carlo Bersani 06-16-2008 04:05 PM

links problem in bacman
 
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:


--- bacman 2008-06-16 17:42:45.000000000 +0200
+++ bacman.new 2008-06-16 17:52:17.000000000 +0200
@@ -136,7 +136,7 @@
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"

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev

"Dan McGee" 06-17-2008 02:03 AM

links problem in bacman
 
On Mon, Jun 16, 2008 at 11:05 AM, Carlo Bersani <carlocci@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.

-Dan

>
>
> --- bacman 2008-06-16 17:42:45.000000000 +0200
> +++ bacman.new 2008-06-16 17:52:17.000000000 +0200
> @@ -136,7 +136,7 @@
> 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"
>
> _______________________________________________
> pacman-dev mailing list
> pacman-dev@archlinux.org
> http://archlinux.org/mailman/listinfo/pacman-dev
>

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev

Carlo Bersani 06-21-2008 06:10 PM

links problem in bacman
 
Il Tuesday 17 June 2008 04:03:04 Dan McGee ha scritto:
> On Mon, Jun 16, 2008 at 11:05 AM, Carlo Bersani <carlocci@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:
--
1.5.5.3

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev

"Dan McGee" 06-23-2008 02:23 AM

links problem in bacman
 
On Sat, Jun 21, 2008 at 1:10 PM, Carlo Bersani <carlocci@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@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

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev

Allan McRae 06-23-2008 07:29 AM

links problem in bacman
 
Dan McGee wrote:
> On Sun, Jun 22, 2008 at 10:46 PM, Allan McRae <allan@archlinux.org> wrote:
>
>> Carlo Bersani wrote:
>>
>>> Sorry, I had to study how git works with coming exams
>>> Hope this is fine:
>>>
>
> Good work Allan. I've quickly thrown it into a wiki article along with
> some helpful links. Guys, *please* edit this as you see fit, as I have
> been around this code for way too long to really know what trips new
> people up.
>
> http://wiki.archlinux.org/index.php/Pacman_Development
>
>

You may want to add a line about checking out other peoples branches
(e.g. the pgp branch). I would be interested in that too...

Also, the submitting patches page needs a bit of updating. It is
currently a mash-up between the pre and post git eras.

Allan





_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev

Allan McRae 07-27-2008 04:12 PM

links problem in bacman
 
Xavier wrote:
> On Mon, Jun 23, 2008 at 9:29 AM, Allan McRae <allan@archlinux.org> wrote:
>
>> You may want to add a line about checking out other peoples branches
>> (e.g. the pgp branch). I would be interested in that too...
>>
>>
>
> Please have a look at these two wiki pages :
> http://wiki.archlinux.org/index.php/Pacman_Development
> http://wiki.archlinux.org/index.php/Super_Quick_Git_Guide
>

I had figured that out a while ago. That is why it is in the first link
you gave! :D



_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev

Allan McRae 07-28-2008 01:03 AM

links problem in bacman
 
Xavier wrote:
> On Sun, Jul 27, 2008 at 6:12 PM, Allan McRae <allan@archlinux.org> wrote:
>
>> I had figured that out a while ago. That is why it is in the first link
>> you gave! :D
>>
>>
>
> What, where?
> I didn't see anything, so I added this :
> http://wiki.archlinux.org/index.php?title=Pacman_Development&diff=46534&oldi d=46533
>

Hmmm... I thought I had added it. Must have just been my local copy.




_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev


All times are GMT. The time now is 09:57 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.