Subversion Repositories SvarDOS

Rev

Rev 719 | Rev 731 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 719 Rev 730
Line 8... Line 8...
8
  files. buildidx will generate the index file and save it into the package
8
  files. buildidx will generate the index file and save it into the package
9
  repository.
9
  repository.
10
 
10
 
11
  requires php-zip
11
  requires php-zip
12
 
12
 
-
 
13
  16 feb 2022: added warning about overlong version strings
13
  15 feb 2022: index is generated as json, contains all filenames and alt versions
14
  15 feb 2022: index is generated as json, contains all filenames and alt versions
14
  14 feb 2022: packages are expected to have the *.svp extension
15
  14 feb 2022: packages are expected to have the *.svp extension
15
  12 feb 2022: skip source packages from being processed (*.src.zip)
16
  12 feb 2022: skip source packages from being processed (*.src.zip)
16
  20 jan 2022: rewritten the code from ANSI C to PHP for easier maintenance
17
  20 jan 2022: rewritten the code from ANSI C to PHP for easier maintenance
17
  13 feb 2021: 'title' LSM field is no longer looked after
18
  13 feb 2021: 'title' LSM field is no longer looked after
Line 28... Line 29...
28
  10 jul 2013: changed unzip calls to 7za (to handle cases when appinfo is compressed with lzma)
29
  10 jul 2013: changed unzip calls to 7za (to handle cases when appinfo is compressed with lzma)
29
  04 feb 2013: added CRC32 support
30
  04 feb 2013: added CRC32 support
30
  22 sep 2012: forked 1st version from FDUPDATE builder
31
  22 sep 2012: forked 1st version from FDUPDATE builder
31
*/
32
*/
32
 
33
 
33
$PVER = "20220215";
34
$PVER = "20220216";
34
 
35
 
35
 
36
 
36
// computes the BSD sum of a file and returns it
37
// computes the BSD sum of a file and returns it
37
function file2bsum($fname) {
38
function file2bsum($fname) {
38
  $result = 0;
39
  $result = 0;
Line 122... Line 123...
122
  $lsmarray = parse_lsm($lsm);
123
  $lsmarray = parse_lsm($lsm);
123
  if (empty($lsmarray['version'])) {
124
  if (empty($lsmarray['version'])) {
124
    echo "ERROR: lsm file in {$fname} does not contain a version\n";
125
    echo "ERROR: lsm file in {$fname} does not contain a version\n";
125
    continue;
126
    continue;
126
  }
127
  }
-
 
128
  if (strlen($lsmarray['version']) > 16) {
-
 
129
    echo "WARNING: version string in lsm file of {$fname} is too long (16 chars max)\n";
-
 
130
    continue;
-
 
131
  }
127
  if (empty($lsmarray['description'])) {
132
  if (empty($lsmarray['description'])) {
128
    echo "ERROR: lsm file in {$fname} does not contain a description\n";
133
    echo "ERROR: lsm file in {$fname} does not contain a description\n";
129
    continue;
134
    continue;
130
  }
135
  }
131
 
136