Bug 9073

Summary: When local path for src/gz is provided and temp directory is also provided opkg creates mutiple copies of debian packages
Product: [Yocto Project Subprojects] opkg Reporter: Ankur Tank <artfri2>
Component: opkgAssignee: Alejandro del Castillo <alejandro.delcastillo>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Undecided    
Version: unspecified   
Target Milestone: ---   
Hardware: Beagleboard   
OS: arm   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Ankur Tank 2016-02-06 09:35:14 UTC
We are using Am335x based custom board, with
-256MB RAM
-4 GB flash
/etc/opkg.conf file contents are as follows,

----------------------------
src/gz repo file:///home/ ---

dest ram /tmp 
lists_dir ext /var/opkg-lists 
option overlay_root /overlay
-------------------------------- 
opkg version : opkg version 0.1.8

For updating firmware in the device we are doing following,

1. Transfer debian(s) packages to /home folder through web-gui(web-server running on the board).
2. After debian(s) are transferred install it using opkg,

Now debian(s) are already present in the /home directory and its max size can be 500MB

if below command is used to install the downloaded debians,
opkg -f /etc/opkg.conf -d ram install packageName

package debian first copied to /tmp/opkg-xxx/ and extracted there and then installed


As /tmp is mounted on tmpfs (RAM=256MB) opkg-cl install fails when debian was bigger ~200MB.
 
so I used another approach of proving tmp_dir(/var/tmp --> on flash) as follows,
opkg -f /etc/opkg.conf -d ram -t /var/tmp packageName


Now it works but problem is time to install the package is more, because

During installation again debian is copied from /home(eMMC with ext4 filesystem) to /var/tmp/opkg-xxx (eMMC with ext4 filesystem) and then extracted and then installation happens,

This process is increasing installation time.

Considering /home and /var/tmp being on the same filesystem if direct debian extraction happens to /var/tmp/opkg-xxxx it would save time to install debian using opkg.

This could be time saving feature when local path is used for src/gz installation.
Comment 1 Alejandro del Castillo 2016-05-31 22:39:15 UTC
Functionality already provided by cache_local_files config option.