浏览代码

Configure backports and contrib repo before update

Bob Mottram 8 年前
父节点
当前提交
e07c8eb2a5
没有帐户链接到提交者的电子邮件
共有 2 个文件被更改,包括 14 次插入9 次删除
  1. 2
    0
      src/freedombone-app-ipfs
  2. 12
    9
      src/freedombone-image-customise

+ 2
- 0
src/freedombone-app-ipfs 查看文件

@@ -206,6 +206,7 @@ function mesh_install_ipfs_js {
206 206
         return
207 207
     fi
208 208
 
209
+    chroot ${rootdir} apt-get -y install nodejs
209 210
     chroot ${rootdir} apt-get -y install npm
210 211
     chroot ${rootdir} apt-get -y install libpam0g-dev fuse
211 212
 
@@ -273,6 +274,7 @@ function install_ipfs_js {
273 274
         return
274 275
     fi
275 276
 
277
+    apt-get -y install nodejs
276 278
     apt-get -y install npm
277 279
     apt-get -y install libpam0g-dev fuse
278 280
 

+ 12
- 9
src/freedombone-image-customise 查看文件

@@ -116,6 +116,16 @@ MESH_SET_USERNAME=$"Welcome to the Freedombone mesh.\n\nThe first thing you will
116 116
 # Whether to enable zeronet on the mesh
117 117
 ENABLE_ZERONET=
118 118
 
119
+function configure_backports {
120
+    echo "deb http://${DEBIAN_REPO}/debian/ ${DEBIAN_VERSION}-backports main" >> $rootdir/etc/apt/sources.list
121
+}
122
+
123
+function configure_contrib_repo {
124
+    if ! grep -q "contrib" $rootdir/etc/apt/sources.list; then
125
+        chroot "$rootdir" sed -i "s| main| main contrib|g" /etc/apt/sources.list
126
+    fi
127
+}
128
+
119 129
 enable_eatmydata_override() {
120 130
     chroot $rootdir apt-get install --no-install-recommends -y eatmydata
121 131
     if [ -x $rootdir/usr/bin/eatmydata ] && \
@@ -530,11 +540,6 @@ initialise_mesh() {
530 540
             chroot "$rootdir" sed -i "s| main| main non-free|g" /etc/apt/sources.list
531 541
         fi
532 542
 
533
-        # enable contrib repo
534
-        if ! grep -q "contrib" $rootdir/etc/apt/sources.list; then
535
-            chroot "$rootdir" sed -i "s| main| main contrib|g" /etc/apt/sources.list
536
-        fi
537
-
538 543
         chroot "$rootdir" apt-get update
539 544
 
540 545
         # install proprietary wifi drivers
@@ -692,10 +697,6 @@ function configure_user_interface {
692 697
         DEBIAN_VERSION='jessie'
693 698
     fi
694 699
 
695
-    # install backports
696
-    echo "deb http://${DEBIAN_REPO}/debian/ ${DEBIAN_VERSION}-backports main" >> $rootdir/etc/apt/sources.list
697
-    chroot "$rootdir" apt-get -y update
698
-
699 700
     # desktop
700 701
     chroot "$rootdir" apt-get -y install mate-desktop-environment
701 702
 
@@ -837,6 +838,8 @@ set_apt_sources $BUILD_MIRROR
837 838
 chroot "$rootdir" apt-get clean
838 839
 chroot "$rootdir" rm -rf /var/lib/apt/lists/*
839 840
 chroot "$rootdir" apt-get clean
841
+configure_backports
842
+configure_contrib_repo
840 843
 chroot "$rootdir" apt-get update
841 844
 
842 845
 cat > $rootdir/usr/sbin/policy-rc.d <<EOF