Menu

Download packages from a repository over HTTP

wpkg
2014-06-16
2014-06-26
  • Trent Clarke

    Trent Clarke - 2014-06-16

    Hi again,

    I'm trying to set up a repository with our packages that sits on a web site somewhere. Unfortunately I can't seem to make it work; I assume I'm missing something blindingly obvious, and was hoping you could give me a shove in the right direction.

    Here's the basic setup:

    1) I have a collection of deb files built with wpkg, and an index file also generated with wpkg, living on a web site.

    2) I have a local directory that contains a wpkg dir, control file and some other arbitrary content. The control file specifies a dependency on one of the packages from the web repo.

    3) I have a build script that creates the core environment, adds the web site repo as a source and does a wpkg --update.

    Essentially, I just want the bootstrap script to be able to do a --build-and-install of the local directory and have wpkg download & install the dependencies from the web site.

    Using the above setup, wpkg is telling me that it can't find any implicit or explicit packages that satisfy the dependencies in my local package. I'm reasonably sure that the dependency is there, and when I download the package file from the web site and use it locally with the --repository option the dependency is satisfied. Specifying the remote repo with the --repository option fails with "not a direct filename".

    Any pointers as to what I'm doing wrong? Or am I trying to do something that wpkg just simply doesn't support? And apologies if I've just missed something (probably written in big letters) in the documentation.

    thanks & regards,

    Trent

     
  • Trent Clarke

    Trent Clarke - 2014-06-17

    OK, after a bit of hacking I've found the bit that's causing me trouble. The repository validation code attempts to stat the repository, assuming it's local directory. This of course explodes when presented with an HTTP uri.

    I've essentially commented this check out on my local machine and everything is working as I'd expect. I'm happy to tidy it up so it only does the stat on direct files and submit a patch or pullreq for your consideration.

    cheers,

    Trent

     
  • Alexis Wilke

    Alexis Wilke - 2014-06-17

    Ah! Strange because it seemed to have been working for me before. My HTTP URIs should have failed too. Hmmm... Proof that having tests that continue to work is the best way to avoid such problems.

    I uploaded the code now, so you should be able to generate a patch using git.

    https://sourceforge.net/p/unigw/master/ci/master/tree/

    Thank you!
    Alexis

     
  • Trent Clarke

    Trent Clarke - 2014-06-19

    Hi Alexis,

    Here are the patches I mentioned.

    disable_stat_for_non_direct_files.patch does pretty much what it says on the tin, and fixed the specific issue I described above.

    address_of_temporary.patch fixes a small bug in wpkg --upgrade_info [--verbose], where you were caching result of stding::c_str() from a temporary string. By the time that the code actually read from that pointer the temporary was gone, and and ended up printing some pretty funky package names for me.

    Hope you find them useful.

    Regards,

    Trent

     
  • Alexis Wilke

    Alexis Wilke - 2014-06-19

    The git was updated and I also put 0.9.3 for download. Thank you for the patches!

     
    • R. Douglas Barbieri

      Yes, Trent, thank you for all you have done! We appreciate your work. :-)

      On 06/19/2014 03:00 AM, Alexis Wilke wrote:

      The git was updated and I also put 0.9.3 for download. Thank you for
      the patches!


      Download packages from a repository over HTTP
      https://sourceforge.net/p/unigw/discussion/647573/thread/17a08da5/?limit=25#94ad


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/unigw/discussion/647573/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      R. Douglas Barbieri
      Vice President
      Made to Order Software Corporation

      e-mail: doug@m2osw.com

      Web Pages: http://www.m2osw.com
      Company e-mail: contact@m2osw.com
      Phone: +(1) 530 220 2063 (cell)
      +(1) 530 554-9559 (skype)
      Fax: +(1) 916 988 1450

      Address: 9275 Blue Oak Drive
      Orangevale, California 95662
      United States of America

       

      Last edit: Alexis Wilke 2014-06-26
  • Trent Clarke

    Trent Clarke - 2014-06-26

    No worries. Happy to help.

     

Log in to post a comment.