Bug 9073 - When local path for src/gz is provided and temp directory is also provided opkg creates mutiple copies of debian packages
Summary: When local path for src/gz is provided and temp directory is also provided op...
Status: RESOLVED FIXED
Alias: None
Product: opkg
Classification: Yocto Project Subprojects
Component: opkg (show other bugs)
Version: unspecified
Hardware: Beagleboard arm
: Undecided major
Target Milestone: ---
Assignee: Alejandro del Castillo
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-02-06 09:35 UTC by Ankur Tank
Modified: 2016-05-31 22:39 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.