Ticket #179: 0001-Fail-when-several-triggers-are-set-on-a-condition.patch

File 0001-Fail-when-several-triggers-are-set-on-a-condition.patch, 1.2 kB (added by pterjan, 2 years ago)
  • a/build/reqprov.c

    old new  
    77 
    88#include <rpm/header.h> 
    99#include <rpm/rpmbuild.h> 
     10#include <rpm/rpmlog.h> 
    1011#include "debug.h" 
    1112 
    1213static int isNewDep(Header h, rpmTag nametag, 
     
    9798        if (indextag) { 
    9899            headerPutUint32(h, indextag, &index, 1); 
    99100        } 
     101    } else { 
     102        /* Duplicate dep is a bug for triggers as only the first one will run */ 
     103        if (tagN == RPMTAG_TRIGGERNAME) { 
     104            rpmlog(RPMLOG_ERR, _("Only one trigger can be set on a specific condition: %s\n"), 
     105                   rpmdsDNEVR(newds)); 
     106            return 1; 
     107        } 
    100108    } 
    101109 
    102110    return 0;