Description of problem: Currently, an UNIQUE constraint exists for the task name, but not for the RPM name. This allows two tasks to exist (unique as far as Beaker is concerned), but actually pointing to the same RPM file. This doesn't affect Beaker's functioning in anyway, but we can't rely any more on the one-one mapping between the two. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Have an one-one mapping between the task name and RPM name. Additional info: This is needed so that tools like beaker-sync-tasks which do reasonably rely on the mapping doesn't break.
Adding a unique key constraint and considering that we are using unicode limits us to 255 characters for the RPM name[1]. I will do a check to see how many of the production RPMs exceed that. [1] https://drupal.org/node/554820
(In reply to Amit Saha from comment #2) > Adding a unique key constraint and considering that we are using unicode > limits us to 255 characters for the RPM name[1]. I will do a check to see > how many of the production RPMs exceed that. Hmm i was obviously not thinking of file system limits there, which makes that a 0 percent probability of finding one.
On Gerrit: http://gerrit.beaker-project.org/#/c/2191/
Verify: The length of rpm's name should not be large than 256. That's linux limited. And upload different tasks with same rpm package name, it will fail. [root@beaker-client-rhel6 jiaxuan]# pwd /root/haha/Sanity/jiaxuan [root@beaker-client-rhel6 jiaxuan]# bkr task-add jiaxuan-1.0-1.noarch.rpm jiaxuan-1.0-1.noarch.rpm Success [root@beaker-client-rhel6 jiaxuan]# cd /root/haha2/Sanity/jiaxuan1/ [root@beaker-client-rhel6 jiaxuan1]# ls jiaxuan-1.0-1.noarch.rpm Makefile PURPOSE runtest.sh [root@beaker-client-rhel6 jiaxuan1]# bkr task-add jiaxuan-1.0-1.noarch.rpm jiaxuan-1.0-1.noarch.rpm Exception: <Fault 1: <class 'bkr.common.bexceptions.BX'>:Cannot import duplicate task jiaxuan-1.0-1.noarch.rpm> [root@beaker-client-rhel6 jiaxuan1]# vim jiaxuan-1.0-1.noarch.rpm Makefile PURPOSE runtest.sh [root@beaker-client-rhel6 jiaxuan1]# vim Makefile [root@beaker-client-rhel6 jiaxuan1]# vim runtest.sh [root@beaker-client-rhel6 jiaxuan1]# rm -rf jiaxuan-1.0-1.noarch.rpm [root@beaker-client-rhel6 jiaxuan1]# cat Makefile | grep PACKAGE_NAME export PACKAGE_NAME=jiaxuan [root@beaker-client-rhel6 jiaxuan1]# vim Makefile [root@beaker-client-rhel6 jiaxuan1]# make package rhts-mk-build-package CURRENT_TAG: 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890-1_0-1 NAME: 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 VERSION: 1.0 RELEASE: 1 SOURCE_DIR: /root/haha2/Sanity/jiaxuan1 TMP_DIR: /mnt/testarea/rhts-build-qWczWpH3 BUILD_DIR: /mnt/testarea/rhts-build-qWczWpH3/rpm-build GENERATED_SOURCE_DIR: /mnt/testarea/rhts-build-qWczWpH3/build INSTALL_DIR: /mnt/testarea/rhts-build-qWczWpH3/install Creating tarball: /mnt/testarea/rhts-build-qWczWpH3/build/1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890-1.0-1.tar.gz tar (child): /mnt/testarea/rhts-build-qWczWpH3/build/1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890-1.0-1.tar.gz: Cannot open./ ./PURPOSE : File name too long ./runtest.sh tar (child): Error is not recoverable: exiting now ./Makefile tar: Child returned status 2 tar: Error is not recoverable: exiting now make: *** [noarch-rpm] Error 1
Beaker 0.15 has been released.