- Timestamp:
- 09/20/2023 09:52:52 AM (12 months ago)
- Branches:
- ablfs-more, trunk
- Children:
- c801809
- Parents:
- 0cd09c6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/gen-special.sh
r0cd09c6 re6a1ec3 88 88 done 89 89 90 # Taking packages inside x7proto etc, as versionned modules. 90 # Taking packages contained in pages installing several packages (x7* except 91 # x7driver, kf5-frameworks, and plasma5-all), as versionned modules. 91 92 # We also write a dependency expansion when a dep is of the form 92 # xorg7-something . Since that is another template, we need93 # a temporary file, which we shall concatenate at the end93 # xorg7-something or kf5-frameworks or plasma5-build. Since that is another 94 # template, we need a temporary file, which we shall concatenate at the end 94 95 cat >tmpfile << EOF 95 96 <xsl:template name="expand-deps"> … … 113 114 <xsl:when test="\$section='$id'"> 114 115 EOF 115 # We extract the list of packages for an xorg page from 116 # the version part of the .xml file. Seems that 117 # the order is not always the same as in the "cat" command. 118 # So we have to read that command too, since it may be assumed 116 # We extract the list of packages for those pages from 117 # the "cat" command that creates the md5 file. We assume 119 118 # that the preceding package is a dependency of the following, 120 119 # except the first. 121 list_cat="$(sed -n '/>cat.*\.\(md5\|dat\)/,/EOF</p' $file | grep -v 'cat\|EOF\|#' | 122 awk '{ print $NF }' | sed 's/-&.*//')" 120 # note that some pages may have several "cat" command, so we have to 121 # make a complex regex for the first line to save. All those lines have 122 # .md5 in them except the one for x7legacy that has .dat. 123 # we need also to remove lines beginning with #. 124 # Note that only xorg pages have '&' in them. So for kde 125 # pages, what is extracted it the full tarball name. 126 list_cat="$(sed -n '/>cat.*\.\(md5\|dat\)/,/EOF</p' $file | \ 127 grep -v 'cat\|EOF\|#' | \ 128 awk '{ print $NF }' | sed 's/-&.*//')" 123 129 124 130 precpack=NONE … … 126 132 if grep -q x7 $file; then # this is an xorg package 127 133 packname=$pack 134 # We extract the version from the ENTITY parts of the .xml file. 128 135 packversion=$(grep "ENTITY ${pack}-version" $file | \ 129 136 sed 's@[^"]*"\([^"]*\).*@\1@') 130 137 else 131 packname=${pack% %-[[:digit:]]*}138 packname=${pack%-[[:digit:]]*} 132 139 packversion=$(echo $pack | sed 's/[^.]*-\([.[:digit:]]*\)\.tar.*/\1/') 133 140 fi 134 ## Rationale for the sed below: the following for breaks words at spaces (unless135 ## we tweak IFS). So replace spaces with commas in lines so that only newlines136 ## are separators.137 # for pack in \138 # $(grep 'ENTITY.*version' $file | sed 's/[ ]\+/,/g'); do139 # packname=$(echo $pack | sed s'@.*ENTITY,\(.*\)-version.*@\1@')140 # packversion=$(echo $pack | sed 's@[^"]*"\([^"]*\).*@\1@')141 # for i in $list_cat; do142 # if [ "$i" = "$packname" ]; then break; fi143 # precpack=$i144 # done145 ## It may happen that packname is not in list_cat, because its entity146 ## is commented out in the xml, but we do not check that (too complicated).147 ## In that case, the whole list is scanned, and $precpack=$i at the end.148 ## when packname is found in the list $precpack!=$i.149 # if [ "$precpack" = "$i" ]; then continue; fi150 141 cat >>$SPECIAL_FILE << EOF 151 142 <module><xsl:text>
 </xsl:text>
Note:
See TracChangeset
for help on using the changeset viewer.