Changeset 1299 for spec/trunk/SPECS
- Timestamp:
- Feb 20, 2018, 10:30:55 AM (8 years ago)
- Location:
- spec/trunk/SPECS
- Files:
-
- 4 edited
-
os2-rpm.spec (modified) (3 diffs)
-
os2-rpm/warpin-conflicts.cmd (modified) (4 diffs)
-
os2-rpm/wpi4rpm.cmd (modified) (10 diffs)
-
os2-rpm/wps-object.cmd (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
-
spec/trunk/SPECS/os2-rpm.spec
r1250 r1299 2 2 Name: os2-rpm 3 3 Version: 0 4 Release: 5%{?dist}4 Release: 6%{?dist} 5 5 License: GPLv2+ 6 6 Group: Development/System … … 13 13 14 14 Provides: system-rpm-config = %{version}-%{release} 15 Provides: wpi4rpm 15 16 16 17 BuildRequires: rexx_exe … … 82 83 83 84 %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 84 89 * Wed Oct 4 2017 Dmitriy Kuminov <coding@dmik.org> 0-5 85 90 - Work around kLIBC bug #379 when unzipping archives with long file names -
spec/trunk/SPECS/os2-rpm/warpin-conflicts.cmd
r1172 r1299 12 12 * 13 13 * 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 15 17 * Version: 1.2 - 2012-02-08 16 18 * - Use WIC -p to get the Package version. This should solve infamous random … … 89 91 if (ver == '') then exit 0 90 92 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')' 98 94 exit 1 99 95 … … 139 135 if (wic_ver \= '' & rc == 0) then return ver 140 136 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.' 145 138 exit 5 146 139 end 147 140 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 153 142 exit 5 154 143 end … … 171 160 end 172 161 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 178 163 exit 5 179 164 end -
spec/trunk/SPECS/os2-rpm/wpi4rpm.cmd
r1298 r1299 1 1 /* WPI4RPM */ 2 ScriptVer = '0.9. 7.0'2 ScriptVer = '0.9.8.0' 3 3 4 4 /* Synopsis: … … 7 7 sure RPM/YUM/ANPM installed packages keep dependent WPI packages happy. 8 8 9 (c) 2017 Herwig Bauernfeind for bww bitwise works GmbH.9 (c) 2017-2018 Herwig Bauernfeind for bww bitwise works GmbH. 10 10 11 11 This program is free software: you can redistribute it and/or modify … … 37 37 Mode = strip(word(arguments,1)) 38 38 if words(Mode) > 1 then do 39 say " wpi4rpm: Parameter parsing error. Aborting..."39 say "ERROR: wpi4rpm: Parameter parsing error. Aborting..." 40 40 exit -1 41 41 end … … 43 43 44 44 if Mode = "ADD" | Mode = "DEL" then do 45 if verbose then say ' wpi4rpm: Mode = "'Mode'"'45 if verbose then say 'INFO: wpi4rpm: Mode = "'Mode'"' 46 46 cversion = word(arguments,words(arguments)) 47 47 pRApp = substr(arguments,length(mode)+2,length(arguments)-(length(mode)+1)-(length(cversion)+1)) … … 74 74 end 75 75 else 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.' 77 77 say 78 78 say ' Adds or removes dummy WPI packages to WarpIN database.' … … 100 100 select 101 101 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." 104 104 exit -2 105 105 end 106 106 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.1107 if verbose then say 'INFO: wpi4rpm: WarpINPath = "'WarpINPath'"' 108 say "ERROR: wpi4rpm: Warning: "WarpINbas.0" WarpIN databases found. Using "WarpINbas.1 109 109 DatBas = WarpINbas.1 110 110 end … … 114 114 ok = SysIni(DatBas,"ALL:",WarpINApps.) 115 115 if 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.' 118 118 exit -3 119 119 end … … 122 122 select 123 123 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.' 125 125 InstTime = time() 126 126 InstDate = date('S') … … 142 142 ok = SysIni(DatBas, AppString, "TargetPath", "DEV\NULL"||"00"x) 143 143 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.' 145 145 exit ok 146 146 end 147 147 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.' 149 149 do I = 1 to WarpINApps.0 150 150 parse var WarpINApps.I WVendor '\' WApp '\' WPackage '\' WMV '\' WLV '\' WBL '\' WRV 151 151 if WarpINapps.I = appstring then do 152 152 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.' 154 154 leave 155 155 end 156 156 end 157 157 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.' 159 159 exit -4 160 160 end 161 161 end 162 162 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." 165 164 end 166 165 end … … 169 168 170 169 errorhandler: 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)'...' 174 171 exit 255 -
spec/trunk/SPECS/os2-rpm/wps-object.cmd
r1172 r1299 119 119 when (cmd == '/DELETEALL') then cmd = 'DA' 120 120 otherwise do 121 say 'ERROR: Invalid command "'G.Args.1'".'121 say 'ERROR: wps-object: Invalid command "'G.Args.1'".' 122 122 return 1 123 123 end … … 125 125 126 126 if (G.Args.0 < 2) then do 127 say 'ERROR: Missing package name.'127 say 'ERROR: wps-object: Missing package name.' 128 128 return 1 129 129 end … … 137 137 else if (cmd == 'C' | cmd == 'D') then do 138 138 if (G.Args.0 < 3) then do 139 say 'ERROR: Missing object ID.'139 say 'ERROR: wps-object: Missing object ID.' 140 140 return 1 141 141 end … … 148 148 else if (G.Args.0 >= 4) then spec = G.Args.4 149 149 if (spec == '') then do 150 say 'ERROR: Missing object specification.'150 say 'ERROR: wps-object: Missing object specification.' 151 151 return 1 152 152 end … … 154 154 155 155 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.' 157 157 return 1 158 158 end … … 161 161 ux = value('UNIXROOT',,'OS2ENVIRONMENT') 162 162 if (ux == '') then do 163 say 'ERROR: UNIXROOT environment variable is not set.'163 say 'ERROR: wps-object: UNIXROOT environment variable is not set.' 164 164 return 1 165 165 end … … 173 173 if (\FileOk(G.ObjectRefsFile)) then do 174 174 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').' 176 176 return rc 177 177 end … … 188 188 if (\FileOk(pkgFile)) then do 189 189 rc = FileErrorCode(pkgFile) 190 say 'ERROR: Could not read "'pkgFile'" (rc='rc').'190 say 'ERROR: wps-object: Could not read "'pkgFile'" (rc='rc').' 191 191 return rc 192 192 end … … 195 195 s2 == '') then do 196 196 rc = -1 197 say 'ERROR: Line #'i 'in file "'pkgFile'" is invalid.'197 say 'ERROR: wps-object: Line #'i 'in file "'pkgFile'" is invalid.' 198 198 return rc 199 199 end … … 248 248 if (rc \= 0 | \FileOk(refsFileTmp)) then do 249 249 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').' 251 251 end 252 252 else do … … 265 265 rc = SysFileDelete(pkgFile) 266 266 if (rc \= 0) then do 267 say 'ERROR: Could not delete "'pkgFile'".'267 say 'ERROR: wps-object: Could not delete "'pkgFile'".' 268 268 end 269 269 end … … 277 277 if (rc \= 0 | \FileOk(pkgFileTmp)) then do 278 278 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').' 280 280 leave 281 281 end … … 310 310 parse var aSpec class'|'title'|'location'|'setup'|'option 311 311 if (class == '' | title == '' | location == '') then do 312 say 'ERROR: Specification "'aSpec'" is invalid.'312 say 'ERROR: wps-object: Specification "'aSpec'" is invalid.' 313 313 return 1 314 314 end 315 315 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.' 317 317 return 1 318 318 end … … 325 325 rc = SysCreateObject(class, title, location, setup, option) 326 326 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', 328 328 'specification "'aSpec'".' 329 329 return 1 … … 373 373 end 374 374 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'>.' 377 376 G.PackageObjects.!modified = 0 378 377 end … … 433 432 end 434 433 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'>.' 437 435 G.PackageObjects.!modified = 0 438 436 end … … 489 487 rc = MakeDir(dir) 490 488 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').' 492 490 return rc 493 491 end … … 511 509 dirTo = FixDir(filespec('D', aFileTo)||filespec('P', aFileTo)) 512 510 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', 514 512 'directory.' 515 513 return -1 … … 519 517 rc = SysFileDelete(aFileTo) 520 518 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').' 522 520 return rc 523 521 end … … 526 524 address 'cmd' 'rename 'aFileFrom filespec('N', aFileTo) 527 525 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').' 529 527 return rc 530 528 end
Note:
See TracChangeset
for help on using the changeset viewer.
