Differences

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

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:additional-software:opkg-to-apk-cheatsheet [2024/11/27 20:39] – import from https://forum.openwrt.org/t/the-future-is-now-opkg-vs-apk/201164 ynezzdocs:guide-user:additional-software:opkg-to-apk-cheatsheet [2024/11/28 01:49] – Add another interesting variant efahlgren
Line 9: Line 9:
 ^ Command ^ Description ^ ^ Command ^ Description ^
 | ''apk -h'' | show commands and summaries | | ''apk -h'' | show commands and summaries |
-{{apk subcmd -h}} | help specific to "subcmd"+''apk subcmd -h'' | help specific to "subcmd"
-{{apk update}} | force update of local indexes, same as opkg |+''apk update'' | force update of local indexes, same as opkg |
  
 ==== Add and remove ==== ==== Add and remove ====
  
-^ apk ^ opkg ^ Description ^ +^ apk              ^ opkg                  ^ Description                
-{{apk update}} {{opkg update}} | refresh the package feeds | +''apk update''   ''opkg update''       | refresh the package feeds  
-{{apk add pkg}} {{opkg install pkg}} | install "pkg+''apk add pkg''  ''opkg install pkg''  | install ''pkg''            
-{{apk del pkg}} {{opkg remove pkg}} | uninstall "pkg|+''apk del pkg''  ''opkg remove pkg''   | uninstall ''pkg''          |
  
-Adding is substantially the same with both package managers. One difference is that {{apk}} wants you to provide valid signatures for all packages, while {{opkg}} ignores this on local ones, so if you're installing a non-standard (self-built) package, use the {{--allow-untrusted}} option:+Adding is substantially the same with both package managers. One difference is that [[:docs:guide-user:additional-software:apk]] wants you to provide valid signatures for all packages, while [[:docs:guide-user:additional-software:opkg]] ignores this on local ones, so if you're installing a non-standard (self-built) package, use the ''--allow-untrusted'' option:
  
 <code> <code>
Line 29: Line 29:
 </code> </code>
  
-Using our note above about {{--update-cache}}, we can now replace the traditional chained {{opkg}} commands with a single {{apk}} one.+Using our note above about ''--update-cache'', we can now replace the traditional chained [[:docs:guide-user:additional-software:opkg]] commands with a single [[:docs:guide-user:additional-software:apk]] one.
  
 <code> <code>
Line 41: Line 41:
 ==== List commands ==== ==== List commands ====
  
-To reiterate, `Pis a file glob in the following. +To reiterate, ''[P]'' is a file glob in the following.
- +
-(editor's note: wrapping of the commands in the table is not optimal)+
  
 ^ apk ^ opkg ^ Description ^ ^ apk ^ opkg ^ Description ^
-{{apk list}} {{opkg list}} | show everything available | +''apk list'' ''opkg list'' | show everything available | 
-{{apk list P}} {{opkg list P}} | show matches for "P", or if you prefer regex then pipe through `grep+''apk list P'' ''opkg list P'' | show matches for ''P'', or if you prefer regex then pipe through ''grep'' 
-{{apk list --installed [P]}} {{opkg list-installed}} | show all installed or those matching "P+''apk list --installed [P]'' ''opkg list-installed'' | show all installed or those matching ''P'' 
-{{apk list --upgradeable [P]}} {{opkg list-upgradable}} | show upgradeable packages | +''apk list --upgradeable [P]'' ''opkg list-upgradable'' | show upgradeable packages | 
-{{apk list --providers [P]}} {{opkg -A whatprovides P}} | show all packages that provide "P|+''apk list --providers [P]'' ''opkg -A whatprovides P'' | show all packages that provide ''P'' |
  
 **Interesting variants** **Interesting variants**
- - `{{apk list --installed --orphaned}}` - shows any dependencies that have been orphaned, i.e., unused packages that may be safely {{del}}eted+ 
 +  * ''apk list --installed --orphaned'' - shows any dependencies that have been orphaned, i.e., unused packages that may be safely ''del''eted 
 +  * ''apk list --installed --manifest'' - produces a simple list of "package-name version" pairs that are easily parsed with ''awk'' or ''sed''
  
 **Comparative examples of listings:** **Comparative examples of listings:**
Line 88: Line 88:
 ==== Package Info ==== ==== Package Info ====
  
-^ apk ^ opkg ^ Description ^ +^ apk                                  ^ opkg              ^ Description                          
-{{apk info P}} {{opkg info P}} | show summary information | +''apk info P''                       ''opkg info P''   | show summary information             
-{{apk info --all P}} | no equivalent | show extensive information | +''apk info --all P''                 | no equivalent     | show extensive information           
-{{apk info --contents P}} {{opkg files P}} | show files contained in the package |+''apk info --contents P''            ''opkg files P''  | show files contained in the package  | 
 + 
 +==== Other operations ==== 
 + 
 +^ apk                                  ^ opkg              ^ Description                          ^ 
 +| ''apk extract --allow-untrusted P''  | ''tar -xvf P''    | extract contents of the package      |
  • Last modified: 2024/12/21 16:25
  • by efahlgren