Results 1 to 15 of 15
Like Tree8Likes
  • 3 Post By Grabber5.0
  • 1 Post By jonwise80
  • 1 Post By Grabber5.0
  • 3 Post By bbito
  1.    #1  
    How do I create an IPK for a script that will execute and perform some actions, and the uninstall itself? This is similar to the AUSMT recovery scripts and the older Emergency Reconstruction/removal packages work. I know if I exit with a non-zero exit code it will be reported as an error by Preware or WOSQI, but the packages I just referenced report as successfully applying. Is there a particular exit code that does this, or another advanced IPK option?
  2.    #2  
    I think I managed to answer my own question by opening one of the self-removing packages in the Preware feed.. At the end of the postinst script (which does the work in this case) it does this:
    Code:
    ipkg -o $IPKG_OFFLINE_ROOT remove $PACKAGE
    $PACKAGE is defined earlier and is just the package id. IPKG_OFFLINE_ROOT is a system variable visible to the script.
    Remy X, vgg and gizmo21 like this.
  3. #3  
    hi, Grabber, you helped me already many times, I'm trying since 5 days to download webos doctor 3.0.5 for my tp,
    but the Hp site doesn't work anymore. I'm correct? there are other ways to download? If not, thanks anyway.
    Alfio Russo
  4. MikeN68's Avatar
    Posts
    344 Posts
    Global Posts
    345 Global Posts
    #4  
    Have a look through this thread - http://forums.webosnation.com/webos-...ed-doctor.html
  5. #5  
    Quote Originally Posted by MikeN68 View Post
    @behemoth,

    When you follow the thread MikeN68 posted, use:

    63.80.4.201 downloads.help.palm.com

    and don't forget to clear your browser's cache for the last week... this will clear the "Premanent Redirect" HTTP response code that HP sent out when you first tried to download a Doctor
    ...
  6. #6  
    Quote Originally Posted by Grabber5.0 View Post
    At the end of the postinst script (which does the work in this case) it does this
    Hey Grabber, how do you make a package run a postinst script?
    I tried putting the script in a /control folder in the root of my package, but when I install it, the script does not run (I tested it by making the script create a new folder in the "internal" storage mount point)
  7.    #7  
    Quote Originally Posted by jonwise80 View Post
    Hey Grabber, how do you make a package run a postinst script?
    I tried putting the script in a /control folder in the root of my package, but when I install it, the script does not run (I tested it by making the script create a new folder in the "internal" storage mount point)
    As I recall, there are two ways. One is using the IPK packager GUI, and the other is with a custom IPK build script, which is the route I went, as I found it more straightforward as a developer. I couldn't get the GUI tool to install a service that used the advanced service framework, which I needed to download and install SSL certificates, otherwise I could have just used a standard package with a service. It has been a while, but I believe I posted about it in another thread. I'll try to dig it up.
  8. #8  
    Quote Originally Posted by Grabber5.0 View Post
    I couldn't get the GUI tool to install a service that used the advanced service framework
    This opened up a whole new world to me. I had no idea that all packages weren't created equal. Apps built with "palm-package" don't have all the features. Similarily, apps with extra features deployed with "palm-install" lose those features. I thought the GUIs were just niceties, but in fact, they add extra capabilities.

    I found the source for IPK packager, but finding a compiled .jar was quite the trick. Posting it here, for posterity:
    https://code.google.com/archive/p/ip...ager/downloads
    Grabber5.0 likes this.
  9.    #9  
    Quote Originally Posted by jonwise80 View Post
    This opened up a whole new world to me. I had no idea that all packages weren't created equal. Apps built with "palm-package" don't have all the features. Similarily, apps with extra features deployed with "palm-install" lose those features. I thought the GUIs were just niceties, but in fact, they add extra capabilities.

    I found the source for IPK packager, but finding a compiled .jar was quite the trick. Posting it here, for posterity:
    https://code.google.com/archive/p/ip...ager/downloads
    If you want to tweak it, my biggest gripe is that it doesn't remember the last directory you opened, making building a package with it tedious. I need to fire up my old laptop and post the info about the script - it was hard to find, but very useful for writing advanced services.
  10. #10  
    Quote Originally Posted by Grabber5.0 View Post
    I need to fire up my old laptop and post the info about the script - it was hard to find, but very useful for writing advanced services.
    While you're digging up old stuff, what I'm trying to do is apply a .patch as part of my postinst script. Do you remember/know how to apply a .patch from the command line?
  11.    #11  
    Quote Originally Posted by jonwise80 View Post
    While you're digging up old stuff, what I'm trying to do is apply a .patch as part of my postinst script. Do you remember/know how to apply a .patch from the command line?
    I've never tried to apply a patch from the command line, because there's a fairly elaborate framework for handling that stuff in Preware and Internalz that I don't want to(attempt to) duplicate. It might be safe to call those scripts as if you were doing a patch package install - I'd look at how Internalz handles .patch file installations. Maybe (but doubtful) it's exposed as a service you can call.

    Something I just thought of.. If it is mwatch-related, you might reconsider, or at least consider carefully, that .patch files installed via Internalz generally have to be removed and reinstalled when they are updated. That may be something Preware handles automatically for packaged patches (that packaging was done by the patch portal, which as you may be aware, is no longer available - at least for now).
  12. #12  
    Quote Originally Posted by Grabber5.0 View Post
    If it is mwatch-related, you might reconsider, or at least consider carefully, that .patch files installed via Internalz generally have to be removed and reinstalled when they are updated.
    I'm beginning to think you're right. Originally, I wanted the app to have additional permissions, like being able to toggle the Bluetooth radio on/off, which would require a com.palm.webos AppID. Since the .patch file sends notifications to the app by ID, a new .patch was needed. However, so far I haven't needed any special permissions, so it may not be necessary to change the App ID -- and therefore not necessary to generate a new .patch. Certainly my experiments with .patches haven't gone super well so far. The addition of management by the "Tweaks" app makes everything a lot more complicated. I may abandon this path...
  13.    #13  
    Quote Originally Posted by jonwise80 View Post
    This opened up a whole new world to me. I had no idea that all packages weren't created equal. Apps built with "palm-package" don't have all the features. Similarily, apps with extra features deployed with "palm-install" lose those features. I thought the GUIs were just niceties, but in fact, they add extra capabilities.

    I found the source for IPK packager, but finding a compiled .jar was quite the trick. Posting it here, for posterity:
    https://code.google.com/archive/p/ip...ager/downloads
    Rather than give you my example, I found the source I got the script from, as I cannot take credit. I never could get it to work in Windows.. only the linux shell script ever worked for me.

    https://github.com/momoim/momo-for-webOS
    jonwise80 likes this.
  14. #14  
    Quote Originally Posted by Grabber5.0 View Post
    only the linux shell script ever worked for me
    Any idea what the "q" executable he calls is? There's no "ar" folder on my Mac with the SDK installed, or my Linux box.
  15. #15  
    Quote Originally Posted by jonwise80 View Post
    Any idea what the "q" executable he calls is? There's no "ar" folder on my Mac with the SDK installed, or my Linux box.
    I've got ar on my (X)Ubuntu 12.04 LTS box and it is even on my Pre2...
    q = Quick Append Option:
    Ubuntu Manpage: ar - create, modify, and extract from archives

Similar Threads

  1. Create package to replace file
    By qurgh in forum webOS Development
    Replies: 2
    Last Post: 08/19/2010, 04:17 PM
  2. Replies: 1
    Last Post: 05/31/2010, 02:35 PM
  3. Best MP3 package
    By 180to650 in forum Palm OS Devices & Apps
    Replies: 12
    Last Post: 07/25/2006, 11:23 PM
  4. Replies: 11
    Last Post: 02/21/2005, 02:59 AM
  5. Removing a program that isn't removing!
    By b3n84 in forum Palm OS Devices & Apps
    Replies: 3
    Last Post: 10/31/2003, 08:23 AM

Posting Permissions