- Timestamp:
- 06/12/2022 08:54:14 PM (2 years ago)
- Branches:
- ablfs-more, trunk
- Children:
- ff30640
- Parents:
- 84d0d39
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LFS/lfs.xsl
r84d0d39 r55e82d2 11 11 <!-- use package management ? 12 12 n = no, original behavior 13 y = yes, add PKG_DEST to scripts in install commands of chapter0 6-0813 y = yes, add PKG_DEST to scripts in install commands of chapter08-10 14 14 --> 15 15 <xsl:param name="pkgmngt" select="'n'"/> … … 17 17 <!-- Package management with "porg style" ? 18 18 n = no, same as pkgmngt description above 19 y = yes, wrap install commands of chapter0 6-08into a bash function.19 y = yes, wrap install commands of chapter08-10 into a bash function. 20 20 note that pkgmngt must be 'y' in this case 21 21 --> … … 188 188 <xsl:if test="$pkgmngt='y' and 189 189 following-sibling::sect1[1][@id='ch-tools-stripping' or @id='ch-tools-cleanup']"> 190 <xsl:choose> 191 <xsl:when test="$bashdir='/tools'"> 192 <xsl:apply-templates 193 select="document('packageManager.xml')//sect1[ 194 contains(@id,'ch-tools')]" 195 mode="pkgmngt"> 196 <xsl:with-param name="order" select="$order+1"/> 197 <xsl:with-param name="dirname" select="$dirname"/> 198 </xsl:apply-templates> 199 </xsl:when> 200 <xsl:otherwise> 201 <xsl:apply-templates 202 select="document('packageManager.xml')//sect1[ 203 contains(@id,'ch-chroot')]" 204 mode="pkgmngt"> 205 <xsl:with-param name="order" select="$order+1"/> 206 <xsl:with-param name="dirname" select="$dirname"/> 207 </xsl:apply-templates> 208 </xsl:otherwise> 209 </xsl:choose> 190 <xsl:apply-templates 191 select="document('packageManager.xml')//sect1[ 192 contains(@id,'ch-chroot')]" 193 mode="pkgmngt"> 194 <xsl:with-param name="order" select="$order+1"/> 195 <xsl:with-param name="dirname" select="$dirname"/> 196 </xsl:apply-templates> 210 197 </xsl:if> 211 198 <xsl:if test="$pkgmngt='y' and … … 246 233 <xsl:otherwise> 247 234 <!-- We cannot know which directory(ies) are needed by the package. Create a 248 reasonable bunch of them. Should be close to "Creating Directories".--> 249 <xsl:text>mkdir -pv $PKG_DEST/{bin,boot,etc,lib,sbin} 235 reasonable bunch of them. Should be close to "Creating Directories". 236 Create also symlinks from /lib, /bin, /sbin to their counterpart 237 in usr, so that the package only has files in /usr--> 238 <xsl:text>mkdir -pv $PKG_DEST/{boot,etc} 250 239 mkdir -pv $PKG_DEST/usr/{bin,include,lib/pkgconfig,sbin} 251 240 mkdir -pv $PKG_DEST/usr/share/{doc,info,bash-completion/completions} … … 254 243 x86_64) mkdir -v $PKG_DEST/lib64 ;; 255 244 esac 245 ln -sv usr/sbin $PKG_DEST 246 ln -sv usr/bin $PKG_DEST 247 ln -sv usr/lib $PKG_DEST 256 248 </xsl:text> 257 249 </xsl:otherwise> … … 300 292 </xsl:text> 301 293 </xsl:if> 302 <!-- remove empty directories -->294 <!-- remove empty directories and symlinks--> 303 295 <xsl:text>for dir in $PKG_DEST/usr/share/man/man{1..8} \ 304 296 $PKG_DEST/usr/share/bash-completion{/completions,} \ … … 306 298 $PKG_DEST/usr/lib/pkgconfig \ 307 299 $PKG_DEST/usr/{lib,bin,sbin,include} \ 308 $PKG_DEST/{boot,etc ,lib,bin,sbin}; do300 $PKG_DEST/{boot,etc}; do 309 301 [ -d "$dir" ] && [ -z "$(ls $dir)" ] && rmdir -v $dir 310 302 done 311 303 [ -d $PKG_DEST/lib64 ] && [ -z "$(ls $PKG_DEST/lib64)" ] && 312 304 rmdir -v $PKG_DEST/lib64 305 rm -v $PKG_DEST/{lib,bin,sbin} 313 306 <!-- prevent overwriting symlinks: if a package install something in 314 307 these directories, it'll be lost if not using package management, … … 1267 1260 1268 1261 if [ -d "$PKGDIR" ]; then rm -rf $PKGDIR; fi 1262 if [ -d "$PKG_DEST" ]; then rm -rf $PKG_DEST; fi 1269 1263 if [ -d "${PKGDIR%-*}-build" ]; then rm -rf ${PKGDIR%-*}-build; fi 1270 1264 </xsl:text>
Note:
See TracChangeset
for help on using the changeset viewer.