[pacman-dev] [PATCH] makepkg: print only base filename of install/changelog files
The complete file path of a temporary symlink is really useless information. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> --- scripts/makepkg.sh.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index c5ce2a2..13feab1 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1112,7 +1112,7 @@ create_srcpackage() { # evaluate any bash variables used eval file='${srclinks}/${pkgbase}/'${file} if [[ ! -f $file ]]; then - msg2 "$(gettext "Adding %s file (%s)...")" "$i" "$file" + msg2 "$(gettext "Adding %s file (%s)...")" "$i" "${file##*/}" ln -s "${startdir}/$file" "${srclinks}/${pkgbase}/" fi done -- 1.7.1
On Thu, Jun 3, 2010 at 10:33 AM, Cedric Staniewski <cedric@gmx.ca> wrote:
The complete file path of a temporary symlink is really useless information.
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> --- scripts/makepkg.sh.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index c5ce2a2..13feab1 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1112,7 +1112,7 @@ create_srcpackage() { # evaluate any bash variables used eval file='${srclinks}/${pkgbase}/'${file} if [[ ! -f $file ]]; then - msg2 "$(gettext "Adding %s file (%s)...")" "$i" "$file" + msg2 "$(gettext "Adding %s file (%s)...")" "$i" "${file##*/}"
Not really sure what the right answer is, but what is the reasoning not to use something like `basename` here? Obviously this is a bit faster but there is a utility for this that must have some practical purpose.
ln -s "${startdir}/$file" "${srclinks}/${pkgbase}/" fi done -- 1.7.1
On Thu, Jun 3, 2010 at 14:59, Dan McGee <dpmcgee@gmail.com> wrote:
The complete file path of a temporary symlink is really useless information.
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> --- Not really sure what the right answer is, but what is the reasoning not to use something like `basename` here? Obviously this is a bit faster but there is a utility for this that must have some practical
On Thu, Jun 3, 2010 at 10:33 AM, Cedric Staniewski <cedric@gmx.ca> wrote: purpose.
I seem to recall reading at some point that basename is not very portable. I could be mistaken though...
On Thu, Jun 3, 2010 at 2:02 PM, Daenyth Blank <daenyth+arch@gmail.com> wrote:
On Thu, Jun 3, 2010 at 14:59, Dan McGee <dpmcgee@gmail.com> wrote:
The complete file path of a temporary symlink is really useless information.
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> --- Not really sure what the right answer is, but what is the reasoning not to use something like `basename` here? Obviously this is a bit faster but there is a utility for this that must have some practical
On Thu, Jun 3, 2010 at 10:33 AM, Cedric Staniewski <cedric@gmx.ca> wrote: purpose.
I seem to recall reading at some point that basename is not very portable. I could be mistaken though...
I thought it was just with the C library function and not the shell wrapper. I made commit dea9b3bc0f6ba49aec8452958f5373fbb20e7df2 some 2.5 years ago. Of course, all our custom basename function does is exactly what the bash replacement above does, so we can probably let it fly. -Dan
On 04/06/10 05:02, Daenyth Blank wrote:
On Thu, Jun 3, 2010 at 14:59, Dan McGee<dpmcgee@gmail.com> wrote:
The complete file path of a temporary symlink is really useless information.
Signed-off-by: Cedric Staniewski<cedric@gmx.ca> --- Not really sure what the right answer is, but what is the reasoning not to use something like `basename` here? Obviously this is a bit faster but there is a utility for this that must have some practical
On Thu, Jun 3, 2010 at 10:33 AM, Cedric Staniewski<cedric@gmx.ca> wrote: purpose.
I seem to recall reading at some point that basename is not very portable. I could be mistaken though...
basename is part of coreutils which is very portable. Anyway, I prefer using bash internals for string manipulation if possible. Allan
On 03.06.2010 20:59, Dan McGee wrote:
Not really sure what the right answer is, but what is the reasoning not to use something like `basename` here? Obviously this is a bit faster but there is a utility for this that must have some practical purpose.
Well, it was decided against basename back in October[1] and there is only one basename call left in makepkg. So I just stuck to this decision to use bash instead. [1] http://mailman.archlinux.org/pipermail/pacman-dev/2009-October/009757.html
On 04/06/10 01:33, Cedric Staniewski wrote:
The complete file path of a temporary symlink is really useless information.
Signed-off-by: Cedric Staniewski<cedric@gmx.ca> --- scripts/makepkg.sh.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Signoff. On my working branch. Allan
participants (4)
-
Allan McRae
-
Cedric Staniewski
-
Daenyth Blank
-
Dan McGee