Skip to content

Commit

Permalink
Revert "update: wait running apt processes"
Browse files Browse the repository at this point in the history
This reverts commit 3147047.
  • Loading branch information
nachoparker committed Nov 10, 2017
1 parent 94b7021 commit f557c8d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
9 changes: 1 addition & 8 deletions build-devel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@
# this is a replica of ncp-update, but from devel branch
install()
{
# wait for other apt processes
test -f /var/lib/apt/lists/lock && echo "waiting for apt processes to finish..." && \
while :; do
test -f /var/lib/apt/lists/lock && break
sleep 1
done
rm -f /etc/apt/apt.conf.d/20nextcloudpi-upgrades

test -f /etc/apt/apt.conf.d/20nextcloudpi-upgrades && { echo "deactivate unattended upgrades first"; return 1; }
echo -e "Downloading updates"
rm -rf /tmp/ncp-update-tmp
git clone --depth 20 -q -b devel https://github.com/nextcloud/nextcloudpi.git /tmp/ncp-update-tmp
Expand Down
16 changes: 16 additions & 0 deletions buildlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,22 @@ function copy_to_image()
rmdir tmpmnt &>/dev/null
}

function deactivate_unattended_upgrades()
{
local IMG=$1
local SECTOR
local OFFSET
SECTOR=$( fdisk -l "$IMG" | grep Linux | awk '{ print $2 }' )
OFFSET=$(( SECTOR * 512 ))

[ -f "$IMG" ] || { echo "no image"; return 1; }
mkdir -p tmpmnt
sudo mount "$IMG" -o offset="$OFFSET" tmpmnt || return 1
sudo rm -f tmpmnt/etc/apt/apt.conf.d/20nextcloudpi-upgrades
sudo umount -l tmpmnt
rmdir tmpmnt &>/dev/null
}

function download_resize_raspbian_img()
{
local SIZE=$1
Expand Down
6 changes: 4 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

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

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

[v0.34.0 ](https://github.com/nextcloud/nextcloudpi/commit/bdf1b13) (2017-11-07) added NCP custom theme with new logo

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

Expand Down
4 changes: 0 additions & 4 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ EXCL_DOCKER+="
nc-update.sh
nc-autoupdate-ncp.sh
"

# wait for other apt processes
test -f /var/lib/apt/lists/lock && { echo "apt is currently running. Try again later"; exit 1; }

cp etc/library.sh /usr/local/etc/

source /usr/local/etc/library.sh
Expand Down

0 comments on commit f557c8d

Please sign in to comment.