Changeset 55e82d2 for LFS


Ignore:
Timestamp:
06/12/2022 08:54:14 PM (2 years ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
ablfs-more, trunk
Children:
ff30640
Parents:
84d0d39
Message:

Various updates for pacman PM

  • update versions and instructions in packageManager.xml.pacman. Also remove the pages for old books.
  • Fix packInstall.sh.pacman, so that restarting after a failure is possible
  • Change LFS/lfs.xsl so that destdir install use symlinks for /lib, /sbin, and /bin. Remove also absolete commands for old books
  • fix gcc script in book parser
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LFS/lfs.xsl

    r84d0d39 r55e82d2  
    1111  <!-- use package management ?
    1212       n = no, original behavior
    13        y = yes, add PKG_DEST to scripts in install commands of chapter06-08
     13       y = yes, add PKG_DEST to scripts in install commands of chapter08-10
    1414  -->
    1515  <xsl:param name="pkgmngt" select="'n'"/>
     
    1717  <!-- Package management with "porg style" ?
    1818       n = no,  same as pkgmngt description above
    19        y = yes, wrap install commands of chapter06-08 into a bash function.
     19       y = yes, wrap install commands of chapter08-10 into a bash function.
    2020                note that pkgmngt must be 'y' in this case
    2121  -->
     
    188188    <xsl:if test="$pkgmngt='y' and
    189189                  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>
    210197    </xsl:if>
    211198    <xsl:if test="$pkgmngt='y' and
     
    246233        <xsl:otherwise>
    247234<!-- 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}
    250239mkdir -pv $PKG_DEST/usr/{bin,include,lib/pkgconfig,sbin}
    251240mkdir -pv $PKG_DEST/usr/share/{doc,info,bash-completion/completions}
     
    254243 x86_64) mkdir -v $PKG_DEST/lib64 ;;
    255244esac
     245ln -sv usr/sbin $PKG_DEST
     246ln -sv usr/bin  $PKG_DEST
     247ln -sv usr/lib  $PKG_DEST
    256248</xsl:text>
    257249        </xsl:otherwise>
     
    300292</xsl:text>
    301293          </xsl:if>
    302 <!-- remove empty directories -->
     294<!-- remove empty directories and symlinks-->
    303295          <xsl:text>for dir in $PKG_DEST/usr/share/man/man{1..8} \
    304296           $PKG_DEST/usr/share/bash-completion{/completions,} \
     
    306298           $PKG_DEST/usr/lib/pkgconfig \
    307299           $PKG_DEST/usr/{lib,bin,sbin,include} \
    308            $PKG_DEST/{boot,etc,lib,bin,sbin}; do
     300           $PKG_DEST/{boot,etc}; do
    309301  [ -d "$dir" ] &amp;&amp; [ -z "$(ls $dir)" ] &amp;&amp; rmdir -v $dir
    310302done
    311303[ -d $PKG_DEST/lib64 ] &amp;&amp; [ -z "$(ls $PKG_DEST/lib64)" ] &amp;&amp;
    312304  rmdir -v $PKG_DEST/lib64
     305rm -v $PKG_DEST/{lib,bin,sbin}
    313306<!-- prevent overwriting symlinks: if a package install something in
    314307     these directories, it'll be lost if not using package management,
     
    12671260
    12681261if [ -d "$PKGDIR" ]; then rm -rf $PKGDIR; fi
     1262if [ -d "$PKG_DEST" ]; then rm -rf $PKG_DEST; fi
    12691263if [ -d "${PKGDIR%-*}-build" ]; then  rm -rf ${PKGDIR%-*}-build; fi
    12701264</xsl:text>
Note: See TracChangeset for help on using the changeset viewer.