RPM Community Forums

Mailing List Message of <rpm-devel>

Re: [CVS] RPM: rpm-5_4: rpm/scripts/ vpkg-provides2.sh

From: devzero2000 <devzero2000@rpm5.org>
Date: Thu 02 Apr 2015 - 18:01:16 CEST
Message-ID: <CAH5b-BXd-GknNmHBG7x4mh4C1Cg3jYu2T5Cm03UO7dUmhuqB8A@mail.gmail.com>
Il 02/Apr/2015 14:58 "Pinto Elia" <devzero2000@rpm5.org> ha scritto:
>
>   RPM Package Manager, CVS Repository
>   http://rpm5.org/cvs/
>
____________________________________________________________________________
>
>   Server: rpm5.org                         Name:   Pinto Elia
>   Root:   /v/rpm/cvs                       Email:  devzero2000@rpm5.org
>   Module: rpm                              Date:   02-Apr-2015 14:57:58
>   Branch: rpm-5_4                          Handle: 2015040212575800
>
>   Modified files:           (Branch: rpm-5_4)
>     rpm/scripts             vpkg-provides2.sh
>
>   Log:
>     vpkg-provides2.sh: use the $( ... \) construct for command
substitution
>
>     Prefer the $( ... ) construct for command
>     substitution instead of using the back-quotes, or grave accents
(`..`).
>
>     The backquoted form is the historical method for command substitution,
>     and is supported by POSIX. However, all but the simplest uses become
>     complicated quickly. In particular, embedded command substitutions
>     and/or the use of double quotes require careful escaping with the
backslash
>     character. Because of this the POSIX shell adopted the $(…) feature
from
>     the Korn shell.
>
>     The patch was generated by the simple script
>
>     for _f in $(find . -type f -exec file {} \; | grep -i shell | awk -F:
'{ print $1 }')
>     do
>       perl -i -pe 'BEGIN{undef $/;} s@`(.*)`@\$($1)@smg' ${_f}
>     done
>
>   Summary:
>     Revision    Changes     Path
>     1.3.22.1    +8  -8      rpm/scripts/vpkg-provides2.sh
>
____________________________________________________________________________
>
>   patch -p0 <<'@@ .'
>   Index: rpm/scripts/vpkg-provides2.sh
>
============================================================================
>   $ cvs diff -u -r1.3 -r1.3.22.1 vpkg-provides2.sh
>   --- rpm/scripts/vpkg-provides2.sh     15 Mar 2001 13:58:16 -0000
1.3
>   +++ rpm/scripts/vpkg-provides2.sh     2 Apr 2015 12:57:58 -0000
 1.3.22.1
>   @@ -11,9 +11,9 @@
>
>    IGNORE_DIRS='@'
>
>   -date=`date`
>   -hostname=`uname -n`
>   -osname=`uname -s`
>   +date=$(date)
>   +hostname=$(uname -n)
>   +osname=$(uname -s)
>
>    # programs we run
>
>   @@ -29,16 +29,16 @@
>    requires_tmp=/tmp/requires.$$
>
>
>   -for pkg in `$u_pkg list_all_packages`
>   +for pkg in $($u_pkg list_all_packages)
>    do
>
>    # find OS pkg information
>
>    spec_filename=$spec_filedir/$pkg
>
>   -veryify_cmd=`$u_pkg print_cmd package_version $pkg | sed -e
"s/\\$1/$pkg/" `
>   +veryify_cmd=$($u_pkg print_cmd package_version $pkg | sed -e
"s/\\$1/$pkg/" )
>
>   -pkg_version=`$u_pkg package_version $pkg `
>   +pkg_version=$($u_pkg package_version $pkg )
>
>
>    # find all the dependencies
>   @@ -74,7 +74,7 @@
>
>    %description
>    This is a virtual RPM package.  It contains no actual files.  It uses
the
>   -\`Provides' token from RPM 3.x and later to list many of the shared
libraries
>   +\$(Provides' token from RPM 3.x and

No. This is a Typo. Sorry. Need to change. Todo.

later to list many of the shared libraries
>    and interpreters that are part of the base operating system and
associated
>    subsets for $osname.
>
>   @@ -103,7 +103,7 @@
>    export PATH
>
>    expected_version='$pkg_version'
>   -current_version=\`$veryify_cmd\`
>   +current_version=\)$veryify_cmd\`
>
>    if [ \$expected_version -ne \$current_version ]; then
>         echo "RPM virtual package does not match OS pkg: $pkg" >&2
>   @@ .
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> CVS Sources Repository                                rpm-cvs@rpm5.org
Received on Thu Apr 2 18:06:52 2015
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.