Author: pierre
Date: Mon Apr 8 03:03:26 2019
New Revision: 4089
Log:
LFS/lfs.xsl: Update directory layout of PKG_DEST
- Do not symlink /{usr/,}lib64->lib
- Do not symlink /usr/{man,info}->share
- Create /lib64 on x86_64
- Create /usr/lib/pkgconfig
- do not create /usr/lib/rpcsvc
- check that a directory exists before testing its emptyness
(for example, attr removes empty manx dirs)
Modified:
jhalfs/trunk/LFS/lfs.xsl
Modified: jhalfs/trunk/LFS/lfs.xsl
==============================================================================
--- jhalfs/trunk/LFS/lfs.xsl Tue Mar 26 00:53:17 2019 (r4088)
+++ jhalfs/trunk/LFS/lfs.xsl Mon Apr 8 03:03:26 2019 (r4089)
@@ -221,32 +221,19 @@
</xsl:text>
</xsl:when>
<xsl:otherwise>
- <xsl:text>mkdir -pv $PKG_DEST/{boot,etc,lib,bin,sbin}
-mkdir -pv $PKG_DEST/usr/{lib,bin,sbin,include}
+<!-- We cannot know which directory(ies) are needed by the package. Create a
+ reasonable bunch of them. Should be close to "Creating Directories".-->
+ <xsl:text>mkdir -pv $PKG_DEST/{bin,boot,etc,lib,sbin}
+mkdir -pv $PKG_DEST/usr/{bin,include,lib/pkgconfig,sbin}
mkdir -pv $PKG_DEST/usr/share/{doc,info,man}
mkdir -pv $PKG_DEST/usr/share/man/man{1..8}
-ln -sv share/{man,doc,info} $PKG_DEST/usr
case $(uname -m) in
- x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64
;;
+ x86_64) mkdir -v $PKG_DEST/lib64 ;;
esac
</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
- <xsl:if test="../@id = 'ch-system-glibc' and
- @role='installation' and
- $pkgmngt = 'y' and
- $wrap-install = 'n'">
- <xsl:text>mkdir -pv $PKG_DEST/usr/include/{rpc,rpcsvc}
-</xsl:text>
- </xsl:if>
- <xsl:if test="../@id = 'ch-system-libelf' and
- @role='installation' and
- $pkgmngt = 'y' and
- $wrap-install = 'n'">
- <xsl:text>mkdir -pv $PKG_DEST/usr/lib/pkgconfig
-</xsl:text>
- </xsl:if>
<xsl:apply-templates
select=".//screen[(not(@role) or
@role != 'nodump') and
@@ -306,20 +293,16 @@
rm -fv $PKG_DEST/sbin/nologin
</xsl:text>
</xsl:if>
- <xsl:text>rm -fv $PKG_DEST/{,usr/}lib64
-rm -fv $PKG_DEST/usr/{man,doc,info}
-for dir in $PKG_DEST/usr/share/man/man{1..8}; do
- [[ -z $(ls $dir) ]] && rmdir -v $dir
-done
-for dir in $PKG_DEST/usr/share/{doc,info,man}; do
- [[ -z $(ls $dir) ]] && rmdir -v $dir
-done
-for dir in $PKG_DEST/usr/{lib,bin,sbin,include}; do
- [[ -z $(ls $dir) ]] && rmdir -v $dir
-done
-for dir in $PKG_DEST/{boot,etc,lib,bin,sbin}; do
- [[ -z $(ls $dir) ]] && rmdir -v $dir
+<!-- remove empty directories -->
+ <xsl:text>for dir in $PKG_DEST/usr/share/man/man{1..8} \
+ $PKG_DEST/usr/share/{doc,info,man} \
+ $PKG_DEST/usr/lib/pkgconfig \
+ $PKG_DEST/usr/{lib,bin,sbin,include} \
+ $PKG_DEST/{boot,etc,lib,bin,sbin}; do
+ [ -d "$dir" ] && [ -z "$(ls $dir)" ] && rmdir -v $dir
done
+[ -d $PKG_DEST/lib64 ] && [ -z "$(ls $PKG_DEST/lib64)" ] &&
+ rmdir -v $PKG_DEST/lib64
PREV_SEC=${SECONDS}
packInstall
SECONDS=${PREV_SEC}
@@ -947,13 +930,6 @@
'install')"/>
<xsl:text>install
</xsl:text>
</xsl:when>
- <xsl:when test="ancestor::sect1[@id='ch-system-attr']">
- <xsl:text>DIST_ROOT=$PKG_DEST make</xsl:text>
- <xsl:call-template name="outputpkgdest">
- <xsl:with-param name="outputstring"
-
select="substring-after($outputstring,'make')"/>
- </xsl:call-template>
- </xsl:when>
<xsl:otherwise>
<xsl:text>make DESTDIR=$PKG_DEST</xsl:text>
<xsl:call-template name="outputpkgdest">
--
http://lists.linuxfromscratch.org/listinfo/alfs-log
Unsubscribe: See the above information page