Changeset 1299 for spec/trunk/SPECS


Ignore:
Timestamp:
Feb 20, 2018, 10:30:55 AM (8 years ago)
Author:
herwigb
Message:

spec: os2-rpm: Release version 0-6.

Location:
spec/trunk/SPECS
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • spec/trunk/SPECS/os2-rpm.spec

    r1250 r1299  
    22Name: os2-rpm
    33Version: 0
    4 Release: 5%{?dist}
     4Release: 6%{?dist}
    55License: GPLv2+
    66Group: Development/System
     
    1313
    1414Provides: system-rpm-config = %{version}-%{release}
     15Provides: wpi4rpm
    1516
    1617BuildRequires: rexx_exe
     
    8283
    8384%changelog
     85* Tue Feb 20 2018 Herwig Bauernfeind <herwig.bauernfeind@bitwiseworks.com> 0-6
     86- Unify format of error messages from wps-object, warpin-conflicts and wpi4rpm
     87- Integrate wpi4rpm into os2-rpm
     88
    8489* Wed Oct 4 2017 Dmitriy Kuminov <coding@dmik.org> 0-5
    8590- Work around kLIBC bug #379 when unzipping archives with long file names
  • spec/trunk/SPECS/os2-rpm/warpin-conflicts.cmd

    r1172 r1299  
    1212 *
    1313 * Author: Dmitriy Kuminov
    14  *
     14 * Version: 1.3 - 2018-02-19 (Herwig Bauernfeind)
     15 *   - Shorten and apply common style to error messages to make the readable
     16 *     for ANPM
    1517 * Version: 1.2 - 2012-02-08
    1618 *   - Use WIC -p to get the Package version. This should solve infamous random
     
    8991    if (ver == '') then exit 0
    9092
    91     say; say 'ERROR:'; say
    92     say 'The following WPI package installed on your system conflicts with the'
    93     say 'RPM package being installed:'; say
    94     say '  'packages.i' (version 'ver')'; say
    95     say 'You cannot have both the WPI and the RPM package installed at the same'
    96     say 'time. Please de-install the specified WPI package using the WarpIn utility'
    97     say 'and try again.'; say
     93    say 'ERROR: warpin-conflicts: Please, uninstall WarpIN 'packages.i' (Version 'ver')'
    9894    exit 1
    9995
     
    139135            if (wic_ver \= '' & rc == 0) then return ver
    140136            if (rc == 5636) then do
    141                 say; say 'ERROR:'; say
    142                 say 'Failed to query the WarpIn database because the WarpIn application'
    143                 say 'is already running.'; say
    144                 say 'Please close the WarpIn application and try again.'; say
     137                say 'ERROR: warpin-conflicts: Please close the WarpIn application and try again.'
    145138                exit 5
    146139            end
    147140            else if (rc \= 0) then do
    148                 say; say 'ERROR:'; say
    149                 say 'Failed to access the WarpIn database. Executing the program'; say
    150                 say '  'wic_exe; say
    151                 say 'failed with exit code 'rc'. Please make sure that the WarpIn'
    152                 say 'application is installed correctly and try again.'; say
     141                say 'ERROR: warpin-conflicts: Executing the program 'wic_exe' failed with exit code 'rc
    153142                exit 5
    154143            end
     
    171160                end
    172161                else do
    173                     say; say 'ERROR:'; say
    174                     say 'Failed to access the WarpIn database file:'; say
    175                     say '  'inis.i; say
    176                     say 'Please close the WarpIn application or, if it is not running, make sure'
    177                     say 'that this file is not locked by another process, and try again.'; say
     162                    say 'ERROR: warpin-conflicts: Failed to access the WarpIn database file 'inis.i
    178163                    exit 5
    179164                end
  • spec/trunk/SPECS/os2-rpm/wpi4rpm.cmd

    r1298 r1299  
    11/* WPI4RPM */
    2 ScriptVer = '0.9.7.0'
     2ScriptVer = '0.9.8.0'
    33
    44/*  Synopsis:
     
    77    sure RPM/YUM/ANPM installed packages keep dependent WPI packages happy.
    88   
    9     (c) 2017 Herwig Bauernfeind for bww bitwise works GmbH.
     9    (c) 2017-2018 Herwig Bauernfeind for bww bitwise works GmbH.
    1010
    1111    This program is free software: you can redistribute it and/or modify
     
    3737Mode      = strip(word(arguments,1))
    3838if words(Mode) > 1 then do
    39     say "wpi4rpm: Parameter parsing error. Aborting..."
     39    say "ERROR: wpi4rpm: Parameter parsing error. Aborting..."
    4040    exit -1
    4141end
     
    4343
    4444if Mode = "ADD" | Mode = "DEL" then do
    45     if verbose then say 'wpi4rpm: Mode = "'Mode'"'
     45    if verbose then say 'INFO:  wpi4rpm: Mode = "'Mode'"'
    4646    cversion  = word(arguments,words(arguments))
    4747    pRApp     = substr(arguments,length(mode)+2,length(arguments)-(length(mode)+1)-(length(cversion)+1))
     
    7474end
    7575else do
    76     say 'WPI4RPM Version 'ScriptVer' (c) 2017 Herwig Bauernfeind for bww bitwise works GmbH.'
     76    say 'WPI4RPM Version 'ScriptVer' (c) 2017-2018 Herwig Bauernfeind for bww bitwise works GmbH.'
    7777    say
    7878    say '  Adds or removes dummy WPI packages to WarpIN database.'
     
    100100select
    101101    when WarpINbas.0 = 0 then do
    102         if verbose then say 'wpi4rpm: WarpINPath = "'WarpINPath'"'
    103         say "wpi4rpm: No WarpIN database found."
     102        if verbose then say 'INFO:  wpi4rpm: WarpINPath = "'WarpINPath'"'
     103        say "ERROR: wpi4rpm: No WarpIN database found."
    104104        exit -2
    105105    end
    106106    when WarpINbas.0 > 1 then do
    107         if verbose then say 'wpi4rpm: WarpINPath = "'WarpINPath'"'
    108         say "wpi4rpm: WARNING: "WarpINbas.0" WarpIN databases found. Using "WarpINbas.1
     107        if verbose then say 'INFO:  wpi4rpm: WarpINPath = "'WarpINPath'"'
     108        say "ERROR: wpi4rpm: Warning: "WarpINbas.0" WarpIN databases found. Using "WarpINbas.1
    109109        DatBas = WarpINbas.1
    110110    end
     
    114114ok = SysIni(DatBas,"ALL:",WarpINApps.)
    115115if datatype(WarpINApps.0) <> "NUM" then do
    116     if verbose then say 'wpi4rpm: Could not open WarpIN database "'datbas'".'
    117     say 'wpi4rpm: Please, close WarpIN and reinstall "'RApp'" again.'
     116    if verbose then say 'ERROR: wpi4rpm: Could not open WarpIN database "'datbas'".'
     117    say 'ERROR: wpi4rpm: Please, close WarpIN and reinstall "'RApp'" again.'
    118118    exit -3
    119119end
     
    122122select
    123123    when Mode = "ADD" then do
    124         if verbose then say 'wpi4rpm: "'Datbas'" will be used.'
     124        if verbose then say 'INFO:  wpi4rpm: "'Datbas'" will be used.'
    125125        InstTime = time()
    126126        InstDate = date('S')
     
    142142        ok = SysIni(DatBas, AppString, "TargetPath", "DEV\NULL"||"00"x)
    143143        ok = SysIni(DatBas, AppString, "WIPackHeader",copies("00"x,16)||"Pck001"||copies("00"x,26))
    144         if verbose then say 'wpi4rpm: "'Appstring'" added.'
     144        if verbose then say 'INFO:  wpi4rpm: "'Appstring'" added.'
    145145        exit ok
    146146    end
    147147    when mode = "DEL" then do
    148         if verbose then say 'wpi4rpm: "'Datbas'" will be used.'
     148        if verbose then say 'INFO:  wpi4rpm: "'Datbas'" will be used.'
    149149        do I = 1 to WarpINApps.0
    150150            parse var WarpINApps.I WVendor '\' WApp '\' WPackage '\' WMV '\' WLV '\' WBL '\' WRV
    151151            if WarpINapps.I = appstring then do
    152152                ok = SysIni(DatBas, WarpINApps.I, "DELETE:")
    153                 if verbose then say 'wpi4rpm: "'WarpINApps.I'" removed.'
     153                if verbose then say 'INFO:  wpi4rpm: "'WarpINApps.I'" removed.'
    154154                leave
    155155            end
    156156        end
    157157        if I > WarpINApps.0 then do
    158             if verbose then say 'wpi4rpm: "'AppString'" not found.'
     158            if verbose then say 'ERROR: wpi4rpm: "'AppString'" not found.'
    159159            exit -4
    160160        end
    161161    end
    162162    otherwise do
    163         say "wpi4rpm: Unknown command invoked."
    164         say "wpi4rpm: Run wpi4rpm help (or /? or /H or -h or --help) to learn about usage."
     163        say "ERROR: wpi4rpm: Unknown command invoked. Run wpi4rpm help to learn about usage."
    165164    end
    166165end
     
    169168
    170169errorhandler:
    171     say "wpi4rpm: An error occured in line "sigl
    172     say "wpi4rpm: "left(strip(sourceline(sigl)),66)'...'
    173     say "wpi4rpm: Run wpi4rpm help (or /? or /H or -h or --help) to learn about usage."
     170    say "ERROR: wpi4rpm: An error occured in line "sigl" "left(strip(sourceline(sigl)),40)'...'
    174171exit 255
  • spec/trunk/SPECS/os2-rpm/wps-object.cmd

    r1172 r1299  
    119119        when (cmd == '/DELETEALL') then cmd = 'DA'
    120120        otherwise do
    121             say 'ERROR: Invalid command "'G.Args.1'".'
     121            say 'ERROR: wps-object: Invalid command "'G.Args.1'".'
    122122            return 1
    123123        end
     
    125125
    126126    if (G.Args.0 < 2) then do
    127         say 'ERROR: Missing package name.'
     127        say 'ERROR: wps-object: Missing package name.'
    128128        return 1
    129129    end
     
    137137    else if (cmd == 'C' | cmd == 'D') then do
    138138        if (G.Args.0 < 3) then do
    139             say 'ERROR: Missing object ID.'
     139            say 'ERROR: wps-object: Missing object ID.'
    140140            return 1
    141141        end
     
    148148            else if (G.Args.0 >= 4) then spec = G.Args.4
    149149            if (spec == '') then do
    150                 say 'ERROR: Missing object specification.'
     150                say 'ERROR: wps-object: Missing object specification.'
    151151                return 1
    152152            end
     
    154154
    155155        if (verify(id, G.InvalidObjectIDChars, 'M') > 0) then do
    156             say 'ERROR: Object ID "'id'" contains invalid characters.'
     156            say 'ERROR: wps-object: Object ID "'id'" contains invalid characters.'
    157157            return 1
    158158        end
     
    161161    ux = value('UNIXROOT',,'OS2ENVIRONMENT')
    162162    if (ux == '') then do
    163         say 'ERROR: UNIXROOT environment variable is not set.'
     163        say 'ERROR: wps-object: UNIXROOT environment variable is not set.'
    164164        return 1
    165165    end
     
    173173        if (\FileOk(G.ObjectRefsFile)) then do
    174174            rc = FileErrorCode(G.ObjectRefsFile)
    175             say 'ERROR: Could not read "'G.ObjectRefsFile'" (rc='rc').'
     175            say 'ERROR: wps-object: Could not read "'G.ObjectRefsFile'" (rc='rc').'
    176176            return rc
    177177        end
     
    188188            if (\FileOk(pkgFile)) then do
    189189                rc = FileErrorCode(pkgFile)
    190                 say 'ERROR: Could not read "'pkgFile'" (rc='rc').'
     190                say 'ERROR: wps-object: Could not read "'pkgFile'" (rc='rc').'
    191191                return rc
    192192            end
     
    195195                s2 == '') then do
    196196                rc = -1
    197                 say 'ERROR: Line #'i 'in file "'pkgFile'" is invalid.'
     197                say 'ERROR: wps-object: Line #'i 'in file "'pkgFile'" is invalid.'
    198198                return rc
    199199            end
     
    248248            if (rc \= 0 | \FileOk(refsFileTmp)) then do
    249249                rc = FileErrorCode(refsFileTmp)
    250                 say 'ERROR: Could not write to "'refsFileTmp'" (rc='rc').'
     250                say 'ERROR: wps-object: Could not write to "'refsFileTmp'" (rc='rc').'
    251251            end
    252252            else do
     
    265265            rc = SysFileDelete(pkgFile)
    266266            if (rc \= 0) then do
    267                 say 'ERROR: Could not delete "'pkgFile'".'
     267                say 'ERROR: wps-object: Could not delete "'pkgFile'".'
    268268            end
    269269        end
     
    277277                    if (rc \= 0 | \FileOk(pkgFileTmp)) then do
    278278                        rc = FileErrorCode(pkgFileTmp)
    279                         say 'ERROR: Could not write to "'pkgFileTmp'" (rc='rc').'
     279                        say 'ERROR: wps-object: Could not write to "'pkgFileTmp'" (rc='rc').'
    280280                        leave
    281281                    end
     
    310310    parse var aSpec class'|'title'|'location'|'setup'|'option
    311311    if (class == '' | title == '' | location == '') then do
    312         say 'ERROR: Specification "'aSpec'" is invalid.'
     312        say 'ERROR: wps-object: Specification "'aSpec'" is invalid.'
    313313        return 1
    314314    end
    315315    if (pos('OBJECTID=', setup) > 0) then do
    316         say 'ERROR: Specification string must not contain OBJECTID.'
     316        say 'ERROR: wps-object: Specification string must not contain OBJECTID.'
    317317        return 1
    318318    end
     
    325325    rc = SysCreateObject(class, title, location, setup, option)
    326326    if (rc \== 1) then do
    327         say 'ERROR: Could not create an object with ID <'aID'> and',
     327        say 'ERROR: wps-object: Could not create an object with ID <'aID'> and',
    328328            'specification "'aSpec'".'
    329329        return 1
     
    373373        end
    374374        if (\ok) then do
    375             say 'ERROR: Object reference file "'G.ObjectRefsFile'" is invalid',
    376                 'near object ID <'aID'>.'
     375            say 'ERROR: wps-object: Object reference file "'G.ObjectRefsFile'" is invalid near object ID <'aID'>.'
    377376            G.PackageObjects.!modified = 0
    378377        end
     
    433432    end
    434433    if (\ok) then do
    435         say 'ERROR: Object reference file "'G.ObjectRefsFile'" is invalid',
    436             'near object ID <'aID'>.'
     434        say 'ERROR: wps-object: Object reference file "'G.ObjectRefsFile'" is invalid near object ID <'aID'>.'
    437435        G.PackageObjects.!modified = 0
    438436    end
     
    489487    rc = MakeDir(dir)
    490488    if (rc \= 0) then do
    491         say 'ERROR: Could not make directory "'dir'" (rc='rc').'
     489        say 'ERROR: wps-object: Could not make directory "'dir'" (rc='rc').'
    492490        return rc
    493491    end
     
    511509    dirTo = FixDir(filespec('D', aFileTo)||filespec('P', aFileTo))
    512510    if (translate(dirFrom) \== translate(dirTo)) then do
    513         say 'ERROR: "'aFileFrom'" and "'aFileTo'" must reside in the same',
     511        say 'ERROR: wps-object: "'aFileFrom'" and "'aFileTo'" must reside in the same',
    514512            'directory.'
    515513        return -1
     
    519517        rc = SysFileDelete(aFileTo)
    520518        if (rc \= 0) then do
    521             say 'ERROR: Could not delete "'aFileTo'" (rc='rc').'
     519            say 'ERROR: wps-object: Could not delete "'aFileTo'" (rc='rc').'
    522520            return rc
    523521        end
     
    526524    address 'cmd' 'rename 'aFileFrom filespec('N', aFileTo)
    527525    if (rc \= 0) then do
    528         say 'ERROR: Could not rename "'aFileFrom'" to "'aFileTo'" (rc='rc').'
     526        say 'ERROR: wps-object: Could not rename "'aFileFrom'" to "'aFileTo'" (rc='rc').'
    529527        return rc
    530528    end
Note: See TracChangeset for help on using the changeset viewer.