Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    uploading debian package with plurl still required distrubtion

    Scheduled Pinned Locked Moved Support
    4 Posts 2 Posters 13 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      manuel.riezebosch_8638
      last edited by manuel.riezebosch_8638

      Working:

      http://localhost:8624/api/packages/my-debian/upload?purl=pkg%3Adeb%2Fnano%409.0-1%3Farch%3Di386%26distro%3Dwtf&distribution=x
      

      Not working:

      http://localhost:8624/api/packages/my-debian/upload?purl=pkg%3Adeb%2Fnano%409.0-1%3Farch%3Damd64%26distro%3Dwtf
      Write-Error: Upload failed for pkg:deb/nano@9.0-1?arch=amd64&distro=wtf Distribution must be specified when adding a Debian package.
      

      So the actual distribution doesn't matter since it's already part of the purl but upload fails when omitted.

      dean-houstonD 1 Reply Last reply Reply Quote 0
      • dean-houstonD Offline
        dean-houston inedo-engineer @manuel.riezebosch_8638
        last edited by

        Hi @manuel-riezebosch_8638 ,

        It looks like the HTTP Endpoint documentation for the pgutil packages upload command was not accurate. A purl is not used here. I've updated the docs as follows...


        To upload a package, simply PUT to the URL with a feed name, an appropriate API Key and a package in either ZIP, JAR or TAR format depending on the value of the Content-Type header.

        PUT /api/packages/«feed-name»/upload[/«package-file-name»]
        

        The «package-file-name» part of the URL is only required for the PyPI and RPM feed types, while Debian feeds will require a distribution argument and an optional component. See the corresponding upload package method on ProGetClient.cs for the most accurate and up-to-date pgutil and HTTP endpoint argument mapping.


        Hope that helps!

        -- Dean

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          manuel.riezebosch_8638 @dean-houston
          last edited by

          @dean-houston from my tests it did look like the information was correctly retrieved from the purl, the distro of the uploaded package matched the distro from the purl and not from the specific query string parameter. I also used it for uploading other packages, but most of them have the metadata inside the package anyway.

          dean-houstonD 1 Reply Last reply Reply Quote 0
          • dean-houstonD Offline
            dean-houston inedo-engineer @manuel.riezebosch_8638
            last edited by

            @manuel.riezebosch_8638 the purl argument was never actually read, so you could have really put anything in there :)

            It was just one of those docs error; many other api endpoints will use a purl argument

            And you're right... all the other package types have metadata inside the package, so that's what's read. Some require a file name, but Debian is an outlier in that it requires a distribution argument as well.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation