OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   08-Oct-2004 12:47:52
  Branch: HEAD                             Handle: 2004100811475200

  Modified files:
    openpkg-src/spread      spread.spec

  Log:
    install logfile in %post and replace unportable 'touch -f' construct

  Summary:
    Revision    Changes     Path
    1.35        +5  -4      openpkg-src/spread/spread.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/spread/spread.spec
  ============================================================================
  $ cvs diff -u -r1.34 -r1.35 spread.spec
  --- openpkg-src/spread/spread.spec    20 Sep 2004 14:33:36 -0000      1.34
  +++ openpkg-src/spread/spread.spec    8 Oct 2004 10:47:52 -0000       1.35
  @@ -34,7 +34,7 @@
   Group:        Network
   License:      BSD-style
   Version:      3.17.2
  -Release:      20040920
  +Release:      20041008
   
   #   package options
   %option       with_perl   no
  @@ -121,9 +121,6 @@
       %{l_shtool} install -c -m 755 %{l_value -s -a} \
           %{SOURCE rc.spread} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
   
  -    #   install bogus log file, to avoid first time run failure
  -    touch -f $RPM_BUILD_ROOT%{l_prefix}/var/spread/spread.log
  -
       %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
           %{l_files_std} `cat perl-openpkg-files` \
           "%config %{l_prefix}/etc/spread/*" \
  @@ -142,6 +139,10 @@
       exit 0
   
   %post
  +    if [ $1 -eq 1 ]; then
  +        #   install bogus log file, to avoid first time run failure
  +        cp /dev/null $RPM_INSTALL_PREFIX/var/spread/spread.log
  +    fi
       if [ $1 -eq 2 ]; then
           #   after upgrade, restore status
           eval `cat %{l_tmpfile}`; rm -f %{l_tmpfile}
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to