Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: pkg_unpack.sh

pkg_unpack.sh 5 years 9 months ago #9758

  • Snarf77
  • Snarf77's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 847
  • Thank you received: 2
  • Karma: 5
Hi Claes,

I have a stupid issue that again require your help.

At the moment on my ARM electronic board the /tmp is mounted on RAM to avoid too many write cycle to the flash. When unpacking a proview package it all goes to /tmp.

Unfortunately my package is growing more and more and is now exceeded the size of my ramdrive allocated to /tmp during the package inflating.
As proview doesn't make permanent write to /tmp I would have no issue to let proview write on disk rather than on RAM but I don't how to modify the script to use another diretory than /tmp.

I first modified without issue the pwr_pkg.sh script so it unpack the pkg_unpack.sh elsewhere but this file (pkg_unpack.sh) still refers to /tmp.

My question is where is the source or templace pkg_unpack.sh file that is used by the distributor in order to generate the tgz proview package so I can modify it at source to be then included in every generated package ?

Thanks a lot for this information
Snarf
The administrator has disabled public write access.

pkg_unpack.sh 5 years 9 months ago #9759

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Hi Snarf,

pkg_unpack.sh is generated from the distributor so you have to modify wb/lib/wb/src/wb_pkg.cpp and rebuild the development environment to change /tmp.

Another alternative is to write a script that modifies the pkg_unpack.sh file in the tgz-file. The tgz-file is a zipped tar-file so it would look something like this. /tmp is here changed to /tmp2.
file="pwrp_pkg_mynode_0001"
cd $pwrp_load
gunzip $file.tgz
tar -xf $file.tar pkg_unpack.sh
sed 's/\/tmp\//\/tmp2\//;s/cd \/tmp/cd \/tmp2/' pkg_unpack.sh > tmp.sh
mv tmp.sh pkg_unpack.sh
tar -f $file.tar --delete pkg_unpack.sh
tar -rf $file.tar pkg_unpack.sh
gzip $file.tar
mv $file.tar.gz $file.tgz

/Claes
The administrator has disabled public write access.

pkg_unpack.sh 5 years 9 months ago #9760

  • Snarf77
  • Snarf77's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 847
  • Thank you received: 2
  • Karma: 5
Hi Claes,
thank a lot for answer.
The script is a good and simple answer that I would be interested to use but I'm just afraid to forget it a the end of the distribute process.
Is there a way to execute this script automatically in the end of the distribute process ?

Else we will modify the pwr_pkg.sh script to include the sed replacement after pkg_unpack.sh extraction

Thank you
Snarf
The administrator has disabled public write access.

pkg_unpack.sh 5 years 9 months ago #9761

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Hi Snarf,

There is no automatic execution so modifying pwr_pkg.sh seems like a good idea.

/Claes
The administrator has disabled public write access.

pkg_unpack.sh 5 years 9 months ago #9762

  • Snarf77
  • Snarf77's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 847
  • Thank you received: 2
  • Karma: 5
OK
done and working fine
Thanks for your help
Snarf
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 8.447 seconds