Project

General

Profile

Actions

Bug #37864

closed

Upload deb package through hammer results in an invalid package being included when it's uploaded for the first time

Added by Macley kun about 2 months ago. Updated 5 days ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

See: https://community.theforeman.org/t/upload-deb-package-through-hammer-results-in-empty-invalid-packages-in-repo/39628
Summary: When uploading a deb package using hammer, the first time the package is uploaded it will result in a successful upload but the repo contains an empty line. When refreshing from a debian host an error is generated that no package was found.
When uploading the same package again it will be shown as another line with the right name and version and does indeed work fine.
Subsequent uploads don't add extra packages which is expected and prefered behavior.

Quick way to test this bug out:
#!/bin/bash
curl --fail-with-body --output /tmp/vim_9.1.0496-1ubuntu5_amd64.deb "http://archive.ubuntu.com/ubuntu/pool/main/v/vim/vim_9.1.0496-1ubuntu5_amd64.deb"
hammer repository upload-content --path /tmp/vim_9.1.0496-1ubuntu5_amd64.deb --organization ORGNAME --product "product name" --name "Repo name"
read -p "Upload successful, please check the repo currently before doing the next upload"
hammer repository upload-content --path /tmp/vim_9.1.0496-1ubuntu5_amd64.deb --organization ORGNAME --product "product name" --name "Repo name"
read -p "Check the repo again, now there's a second entry which has the correct details and works"
rm /tmp/vim_9.1.0496-1ubuntu5_amd64.deb

I've chosen to put this on prioty low as uploading it a second time does push the package through. While this sadly generates a warning on the host that can reach the repository, it doesn't change the return code of the subscription-manager/apt.


Files

08d0c2da7085ca41c9f1c7fb42da04c7aae18c92.png View 08d0c2da7085ca41c9f1c7fb42da04c7aae18c92.png 27.8 KB Uploaded Debs UI Macley kun, 09/30/2024 12:21 PM
7168a0b9c83b388c2062a06bd1b1d66e38fa6090.png View 7168a0b9c83b388c2062a06bd1b1d66e38fa6090.png 47 KB Removing invalid debs job stuck Macley kun, 09/30/2024 12:21 PM

Related issues 1 (0 open1 closed)

Related to Katello - Bug #38035: Upload deb package through hammer may not add it publicationClosedActions
Actions

Also available in: Atom PDF