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!

Deleting Debian Packages don't work



  • I'm trying to remove Debian packages using the API on a ProGet 2024.3 installation, following this documentation. I tried both, pgutil and HTTP request, and none of them worked for me.
    I suspect it's a software or documentation issue because the same process works for Chocolatey (Nuget) packages.
    I tried pgutil:

    pgutil packages delete --source=scati --feed=stable --package=scati/pacomalarmprocessor --version=7.2.1.0-1 --qualifier="arch=amd64"
    

    and HTTP request:

    $uri = 'https://neptuno.sisifo.this:8080/api/packages/stable/delete?group=scati&name=pacomalarmprocessor&version=7.2.1.0-1&qualifier=arch%3Damd64'
    $response = Invoke-WebRequest -Uri $uri -Method Post -Headers @{"X-ApiKey" = $apiKey}
    

    By contrast Nuget works with:

    pgutil packages delete --source=scati --feed=beta --package=scatimetadata --version=7.2.0
    

    In ProGet Event Log webpage I see a line Package Deleted beta systemapi 13/05/2024 16:25:27 after execute pgutil with a Nuget package. But nothing is written with Debian packages (expected as nothing is deleted in fact).
    However, in API Key Access Logs webpage there is a
    request line with response code 200 (Success) https://neptuno.sisifo.this:8080/api/packages/stable/delete?group=scati&name=pacomalarmprocessor&version=7.2.1.0-1&qualifier=arch=amd64 200

    And that's maybe another problem because pgutil command always return Package deleted even if you use a non-existing package intentionally.

    Thank you.


  • inedo-engineer

    Hi @daniel-scati ,

    Thanks for sharing this; Debian packages are a "little weird" in they require that qualifier, and it'd be nice if it was a little more intuitive. I wonder if there's an additional qualifier required?

    We'd really like to improve the experience. What does this Package look like in the ProGet UI? Can you use the Common Package API to find what information is returned in the purl of the package, when you list it?

    Thanks,
    Alana



  • Hi @atripp,
    sorry I don't really get what you mean.
    In the ProGet UI everything looks ok, I guess. I don't really know what to look at.
    Regarding to the Common Package API and purl, could you give me some information about how to request that information? I only have been able to find this webpage https://docs.inedo.com/docs/proget-api-common-package that returns a 404 error.

    Thanks.


  • inedo-engineer

    @daniel-scati looks like there was a redirect problem, but this is the method to try:
    https://docs.inedo.com/docs/proget-api-packages-query-latest

    So basically this:
    GET /api/packages/MyDebianFeed/latest?name=pacomalarmprocessor



  • Thanks @stevedennis,
    this is the information returned:

    [
        {
            "purl": "pkg:deb/pacomalarmprocessor@7.2.1.0-1?arch=amd64&component=scati&distro=bionic",
            "name": "pacomalarmprocessor",
            "version": "7.2.1.0-1",
            "qualifier": "arch=amd64&component=scati&distro=bionic",
            "totalDownloads": 0,
            "downloads": 0,
            "published": "2024-05-14T07:40:58.73Z",
            "publishedBy": "Admin (API)",
            "size": 7088772,
            "md5": "f9b5cac473e1539824486ec76c8515b7",
            "sha1": "43e2493ee4fd6f6284c225bda574da8f884597ea",
            "sha256": "aa51e0cff448c3df2fcc509fb7f223fa600ed129c81a15b5f1c15e2f34dd0f1f",
            "sha512": "38d6cdfb91a052edddf1452c763f8cc83845f896a9fa7e5c6539071ad0f17be5188d7c39ff41b5690eb89e08527eac5dfc23d2355dfb4050986570b086ef2b61",
            "versions": [
                "7.2.1.0-1",
                "7.2.1.0-1"
            ]
        }
    ]
    

    Odd or not, it claims that I have twice the same version 7.2.1.0-1. I presume that's because I have one bionic and one jammy version.
    This is the list of files in the Web UI:

    Files
    Name	Size	Published	
    bionic/scati/pacomalarmprocessor_7.2.1.0-1_amd64.deb	6.922 KB	14/05/2024 9:40:58	
    jammy/scati/pacomalarmprocessor_7.2.1.0-1_amd64.deb	7.913 KB	14/05/2024 9:37:31	
    

    According to the returned qualifier I tried other options, but it still fails:

    pgutil packages delete --source=scati --feed=stable --package="scati/pacomalarmprocessor" --version=7.2.1 --qualifier="arch=amd64&component=scati&distro=bionic"
    
    pgutil packages delete --source=scati --feed=stable --package="pacomalarmprocessor" --version=7.2.1 --qualifier="arch=amd64&component=scati&distro=bionic"
    
    pgutil packages delete --source=scati --feed=stable --package="scati/pacomalarmprocessor" --version=7.2.1 --qualifier="arch=amd64&distro=bionic"
    

  • inedo-engineer

    Hi @daniel-scati,

    I've logged (and fixed) the duplicate versions issue as PG-2686, and that will be included in today's release (ProGet 2024.4).

    Regarding the delete command, I've gotten it working using this command:

    pgutil packages delete --source=scati --feed=stable --package="pacomalarmprocessor" --version=7.2.1.0-1 --qualifier="arch=amd64&component=scati&distro=bionic"
    

    The only change I made was to put in the full version string instead of just 7.2.1.

    Agreed on it being confusing that it succeeds even if the package wasn't found. That was one of those things that made sense in specification (why should I care if the package I want to delete doesn't exist?) but in practice it just hides an error. I think we'll eventually change this API to return an indication that something was actually deleted.

    Hope this helps!



  • Hi @gdivis,

    pgutil packages delete --source=scati --feed=stable --package="pacomalarmprocessor" --version=7.2.1.0-1 --qualifier="arch=amd64&component=scati&distro=bionic"

    It works perfect with that command.

    Thank you. Keep up the good work.


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation