User Tools

Site Tools


doc:techref:opkg

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:techref:opkg [2017/01/18 19:37]
bugmesnot add missing paths when installing to ram
doc:techref:opkg [2017/09/08 18:08] (current)
tmomas alte Version wiederhergestellt (2017/08/29 05:14)
Line 335: Line 335:
 However, the above line does not delete the dependencies that were installed along with the package responsible. Also, it leaves empty directories around. The script below intends to fix those. However, the above line does not delete the dependencies that were installed along with the package responsible. Also, it leaves empty directories around. The script below intends to fix those.
  
-<​code>​ +<​code>#​!/​bin/​sh
-#!/bin/sh+
 #takes one argument/​parameter:​ the name of the package which didn't install correctly and should be removed along with its dependencies #takes one argument/​parameter:​ the name of the package which didn't install correctly and should be removed along with its dependencies
-#do opkg update first 
 #example: ./​opkgremovepartlyinstalledpackage.sh pulseaudio-daemon #example: ./​opkgremovepartlyinstalledpackage.sh pulseaudio-daemon
  
 #get list of all packages that would be installed along with package x #get list of all packages that would be installed along with package x
 +PACKAGES=`opkg --force-space --noaction install $1 | grep "​http:"​ | cut -f 2 -d ' ' | sed '​s/​\.$//'​`
 opkg update opkg update
-PACKAGES=`opkg --force-space --noaction install $1 | grep "​http:"​ | cut -f 2 -d ' ' | sed '​s/​.$//'​` 
 for i in $PACKAGES for i in $PACKAGES
 do do
-        LIST=`wget -qO- $i | tar -Oxz ./​data.tar.gz | tar -tz | sort -r | sed '​s/​^./​\/​overlay/'​`+        LIST=`wget -qO- $i | tar -Oxz ./​data.tar.gz | tar -tz | sort -r | sed '​s/​^./​\/​overlay\/upper/'`
         for f in $LIST         for f in $LIST
         do         do
Line 363: Line 361:
 echo "You may need to reboot for the free space to become visible"​ echo "You may need to reboot for the free space to become visible"​
 </​code>​ </​code>​
-Save it as ''​opkgclean.sh''​ somewhere in your OpenWrt box, set it as an executable with ''​chmod +x ./opkgclean.sh''​ and you can execute it by doing ''​./​opkgclean.sh <​package-name>​ ''​ .+Save it as ''​opkgremovepartlyinstalledpackage.sh''​ somewhere in your OpenWrt box, set it as an executable with ''​chmod +x ./opkgremovepartlyinstalledpackage.sh''​ and you can execute it by doing ''​./​opkgclean.sh <​package-name>​ ''​ .
  
 ===== Extras ===== ===== Extras =====
Line 370: Line 368:
 ==== Commands ==== ==== Commands ====
  
-To find installed ​pkgs of a specific install target (ex. USB) (**DRAWBACK!!! if any update availlableit will update the package, just be warned!!!**):​ +Find installed ​packages ​of a specific install target (eg ''​root''​, ''​usb''​)
- +
-''​for pkg in `opkg list-installed | sed -e "​s/​^([0-9A-Za-z\-]+) - .*$/​\1/​p"​ -n`; do opkg install $pkg; done | grep -i installed\ in\ <​TARGET>​''​+
  
 +<code bash>
 +# ALL
 +opkg list-installed |sed "s/ - .*//​p;​d"​ |xargs -n1 opkg files |sed "​s/​^Package \(.*\) and has .*/​\1/​p;​d"​
 +# Destination `usb'
 +opkg list-installed |sed "s/ - .*//​p;​d"​ |xargs -n1 opkg files |sed "​s/​^Package \(.*\) and has .*/​\1/​p;​d"​ |grep -w usb$
 +</​code>​
 ===== Notes ===== ===== Notes =====
 | {{:​meta:​icons:​tango:​48px-outdated.svg.png?​nolink}} | Since Trunk [[https://​dev.openwrt.org/​changeset/​23173|r23173]] respectively Backfire [[https://​dev.openwrt.org/​changeset/​23206|r23206]] the kernel and kmod packages are flagged as //hold//. \\ The ''​opkg upgrade''​ command won't attempt to update them anymore. | | {{:​meta:​icons:​tango:​48px-outdated.svg.png?​nolink}} | Since Trunk [[https://​dev.openwrt.org/​changeset/​23173|r23173]] respectively Backfire [[https://​dev.openwrt.org/​changeset/​23206|r23206]] the kernel and kmod packages are flagged as //hold//. \\ The ''​opkg upgrade''​ command won't attempt to update them anymore. |
doc/techref/opkg.1484764637.txt.bz2 · Last modified: 2017/01/18 19:37 by bugmesnot