Skip to content

Commit f557c8d

Browse files
committed
Revert "update: wait running apt processes"
This reverts commit 3147047.
1 parent 94b7021 commit f557c8d

File tree

4 files changed

+21
-14
lines changed

4 files changed

+21
-14
lines changed

build-devel.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,7 @@
1717
# this is a replica of ncp-update, but from devel branch
1818
install()
1919
{
20-
# wait for other apt processes
21-
test -f /var/lib/apt/lists/lock && echo "waiting for apt processes to finish..." && \
22-
while :; do
23-
test -f /var/lib/apt/lists/lock && break
24-
sleep 1
25-
done
26-
rm -f /etc/apt/apt.conf.d/20nextcloudpi-upgrades
27-
20+
test -f /etc/apt/apt.conf.d/20nextcloudpi-upgrades && { echo "deactivate unattended upgrades first"; return 1; }
2821
echo -e "Downloading updates"
2922
rm -rf /tmp/ncp-update-tmp
3023
git clone --depth 20 -q -b devel https://github.com/nextcloud/nextcloudpi.git /tmp/ncp-update-tmp

buildlib.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,22 @@ function copy_to_image()
143143
rmdir tmpmnt &>/dev/null
144144
}
145145

146+
function deactivate_unattended_upgrades()
147+
{
148+
local IMG=$1
149+
local SECTOR
150+
local OFFSET
151+
SECTOR=$( fdisk -l "$IMG" | grep Linux | awk '{ print $2 }' )
152+
OFFSET=$(( SECTOR * 512 ))
153+
154+
[ -f "$IMG" ] || { echo "no image"; return 1; }
155+
mkdir -p tmpmnt
156+
sudo mount "$IMG" -o offset="$OFFSET" tmpmnt || return 1
157+
sudo rm -f tmpmnt/etc/apt/apt.conf.d/20nextcloudpi-upgrades
158+
sudo umount -l tmpmnt
159+
rmdir tmpmnt &>/dev/null
160+
}
161+
146162
function download_resize_raspbian_img()
147163
{
148164
local SIZE=$1

changelog.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11

2-
[v0.34.1](https://github.com/nextcloud/nextcloudpi/commit/36d2ee5) (2017-11-09) nc-nextcloud: added more logging
2+
[v0.34.2](https://github.com/nextcloud/nextcloudpi/commit/490c8fb) (2017-11-09) Revert "update: wait running apt processes"
33

4-
[v0.34.0](https://github.com/nextcloud/nextcloudpi/commit/bdf1b13) (2017-11-07) added NCP custom theme with new logo
4+
[v0.34.1](https://github.com/nextcloud/nextcloudpi/commit/343c406) (2017-11-09) nc-nextcloud: added more logging
5+
6+
[v0.34.0 ](https://github.com/nextcloud/nextcloudpi/commit/bdf1b13) (2017-11-07) added NCP custom theme with new logo
57

68
[v0.33.0 ](https://github.com/nextcloud/nextcloudpi/commit/d478a34) (2017-11-06) added redis
79

update.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ EXCL_DOCKER+="
4949
nc-update.sh
5050
nc-autoupdate-ncp.sh
5151
"
52-
53-
# wait for other apt processes
54-
test -f /var/lib/apt/lists/lock && { echo "apt is currently running. Try again later"; exit 1; }
55-
5652
cp etc/library.sh /usr/local/etc/
5753

5854
source /usr/local/etc/library.sh

0 commit comments

Comments
 (0)