Hi.
Is there any way to make a pinstall.sh script able to know from which location its PET is installed?
Let's say, the PET is downloaded to /root /downloads (but can also be somewhere else) and the pinstall.sh script could find the PET in /root/downloads (or somewhere else) - is this possible?
Thanks
RSH
Getting the APPDIR from installed PET?
Getting the APPDIR from installed PET?
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]
The new LazY Puppy Information Centre[/url][/b]
I don't think so -the script gets run in '/' by the intsaller -you could modify PPM (or whatever it is) so that the location of the raw package could be used. But, it sounds like you are trying to do something really weird(outside the scope of the script) -why should the pinstall.sh care or need to know where the original package is?
The original package is a special build package for automated update application. It creates and supports files to read information and to look at screenshots online before installing the package.But, it sounds like you are trying to do something really weird(outside the scope of the script) -why should the pinstall.sh care or need to know where the original package is?
To exclude the package from the list (if then installed) at next check for updates, each package has an automatically created pinstall.sh script (existing one is first renamed and then included at this action) that writes an empty file to mark the package as installed in the OS.
The idea is now to include available online information into this empty file.
I can do this from within the Updater GUI code - already done and working. But if one chooses to download only and install later (online information is downloaded also then) the package needs to find the now local saved information file.
Inside the Updater GUI it will then be possible to read all information to online available and not yet installed packages (first tab) and also to read all information to already installed packages (second tab) - so the user would be well informed at every time.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]
The new LazY Puppy Information Centre[/url][/b]
"package needs to find the now local saved information file" Then, the location of these information files needs to be standardized so that any pinstall.sh can find the right one.
But, what you are trying to do is way outside the scope of an install script: 'look at screenshots online before installing the package' By the time the install script is run -the package has already been installed! The install script performs any actions which are needed to complete the installation -but the dirs and files of the package are already in place at this time.
You are trying to do something elegant with package handling, but you are building on top of a completly non-elegant packaging and installation system. Neither PPM or even the pet format are equipped for doing anything fancy -they don't even cover the most basic functionality of software delivery and installation. I seem to recall something about "sow ears and silk purses"...
But, what you are trying to do is way outside the scope of an install script: 'look at screenshots online before installing the package' By the time the install script is run -the package has already been installed! The install script performs any actions which are needed to complete the installation -but the dirs and files of the package are already in place at this time.
You are trying to do something elegant with package handling, but you are building on top of a completly non-elegant packaging and installation system. Neither PPM or even the pet format are equipped for doing anything fancy -they don't even cover the most basic functionality of software delivery and installation. I seem to recall something about "sow ears and silk purses"...
That's how they are (until the user moves the package before installing) - made with a especially build petmaker for these sort of packages (which are usual packages with additions)."package needs to find the now local saved information file" Then, the location of these information files needs to be standardized so that any pinstall.sh can find the right one.
No, the pinstall script does only msrk the package as installed. Everything else is either build/created by the special petmaker or provided through the Updater GUIBut, what you are trying to do is way outside the scope of an install script: 'look at screenshots online before installing the package' By the time the install script is run -the package has already been installed! The install script performs any actions which are needed to complete the installation -but the dirs and files of the package are already in place at this time.
So, I got to get creative a little...You are trying to do something elegant with package handling, but you are building on top of a completly non-elegant packaging and installation system. Neither PPM or even the pet format are equipped for doing anything fancy -they don't even cover the most basic functionality of software delivery and installation. I seem to recall something about "sow ears and silk purses"...
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]
The new LazY Puppy Information Centre[/url][/b]
"location of these information files needs to be standardized" I man use an absolute path -then it won't matter where the package is.
PPM really does very little in the way of 'housekeeping' -that's its' first problem- so it wouldn't take much to duplicate(and expand) its' functionality completely with your tool. Who knows? You might come up with the next Big Thing in Puppylandia!
PPM really does very little in the way of 'housekeeping' -that's its' first problem- so it wouldn't take much to duplicate(and expand) its' functionality completely with your tool. Who knows? You might come up with the next Big Thing in Puppylandia!
I do not know much about the package manager, but it would be exactly just one single line needed to add to the code of petget.amigo wrote:PPM really does very little in the way of 'housekeeping' -that's its' first problem- so it wouldn't take much to duplicate(and expand) its' functionality completely with your tool.
This is line 285 in LazY Puppy petget, which is a modified version (password check for the User mode kids, beginner and intermediary; check for available SFS of program to install (names of SFS are placed in diff. lists); preventing some predefined files not to be replaced on package install (as the whole petget directory) etc.pp.) - so, in the usual petget it's surely another line number:
Code: Select all
cp -f "${PKGPATH}/${FULLPKGNAME}" /root/ 2>/dev/null #v424 fix if spaces in path.
Code: Select all
echo "${PKGPATH}/${FULLPKGNAME}" > /path/to/a/file
But this would need to be built in by default, otherwise its gone when updating the installed petget (that's why I did add functions to LazY Puppy petget; one can install updates of petget, but these updates will never stay!).
To add full functionality of this to the package manager it would be surely some more work to do, but, for sure, its even possible.
For anyone who might be interested on the project where this here is placed in, please look here.
RSH
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]
The new LazY Puppy Information Centre[/url][/b]