Skip to content

Commit 174f978

Browse files
committed
[opkg] prevent updated dependencies from being installed in an added destination
OpenPLi uses added destinations only for picon packages, which do not have package dependencies.
1 parent 27d67dc commit 174f978

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

lib/python/Components/Opkg.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,11 @@ def __init__(self, opkg='opkg'):
138138
def setCurrentCommand(self, command=None):
139139
self.currentCommand = command
140140

141-
def runCmdEx(self, cmd):
142-
self.runCmd("%s %s" % (opkgExtraDestinations(), cmd))
141+
def runCmdEx(self, cmd, addDests=False):
142+
if addDests:
143+
self.runCmd("%s %s" % (opkgExtraDestinations(), cmd))
144+
else:
145+
self.runCmd(cmd)
143146

144147
def runCmd(self, cmd):
145148
print("executing", self.opkg, cmd)
@@ -163,10 +166,11 @@ def startCmd(self, cmd, args=None):
163166
self.runCmdEx("upgrade busybox | tee -a /home/root/opkgupgrade.log")
164167
break
165168
self.runCmdEx("upgrade %s | tee -a /home/root/opkgupgrade.log" % append)
169+
self.runCmdEx("upgrade %s | tee -a /home/root/opkgupgrade.log" % append, True)
166170
elif cmd == self.CMD_LIST:
167171
self.fetchedList = []
168172
if args['installed_only']:
169-
self.runCmdEx("list_installed")
173+
self.runCmdEx("list_installed", True)
170174
else:
171175
self.runCmd("list")
172176
elif cmd == self.CMD_INSTALL:

tools/enigma2.sh.in

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,6 @@ while : ; do
101101
rm -R /etc/enigma2
102102
;;
103103
42)
104-
df -P | grep -v "tmpfs " | awk '{print $6}' | tail -n +3 > /tmp/upgrade_mountpoints.txt
105-
while read line; do
106-
if [ -f $line/var/lib/opkg/status ]; then
107-
DESTS=$DESTS" --add-dest "$line":"$line
108-
fi
109-
done < /tmp/upgrade_mountpoints.txt
110104
# bind the console (when available)
111105
[ -f /sys/class/vtconsole/vtcon1/bind ] && echo 1 > /sys/class/vtconsole/vtcon1/bind
112106
prevupd=0
@@ -116,13 +110,23 @@ while : ; do
116110
if [ "$(opkg list-upgradable busybox)" != "" ]; then
117111
opkg update busybox 2>&1 | tee -a /home/root/opkgupgrade.log
118112
fi
119-
# update all other packages
113+
# update all other packages installed on the rootfs
120114
while [ $currupd -gt 0 -a $currupd -ne $prevupd ]; do
121-
opkg upgrade $DESTS 2>&1 | tee -a /home/root/opkgupgrade.log
115+
opkg upgrade 2>&1 | tee -a /home/root/opkgupgrade.log
122116
prevupd=$currupd
123117
currupd=`opkg list-upgradable | wc -l`
124118
echo "===> $currupd PACKAGE(S) REMAINING" >> /home/root/opkgupgrade.log
125119
done
120+
# and remaining install destinations
121+
df -P | grep -v "tmpfs " | awk '{print $6}' | tail -n +3 > /tmp/upgrade_mountpoints.txt
122+
while read line; do
123+
if [ -f $line/var/lib/opkg/status ]; then
124+
DESTS=$DESTS" --add-dest "$line":"$line
125+
fi
126+
done < /tmp/upgrade_mountpoints.txt
127+
if [ "$DESTS" != "" ]; then
128+
opkg upgrade $DESTS 2>&1 | tee -a /home/root/opkgupgrade.log
129+
fi
126130
/sbin/reboot
127131
;;
128132
43)

0 commit comments

Comments
 (0)