sealingtech / CLIP

SealingTech's Certifiable Linux Integration Platform
9 stars 12 forks source link

PKG_NAME_FROM_RPM doesn't handle packages w/ numbers in the package name #56

Open sshimko opened 9 years ago

sshimko commented 9 years ago

The sed expression in PKG_NAME_FROM_RPM doesn't work correctly if a package has a number in the package name. Perhaps something like this is more appropriate:

PKG_NAME_FROM_RPM = $(shell echo "$(1)" | $(SED) -r -e 's/^(.)-$(PKG_VER)-$(PKH_REL).$$/\1/')

than the old one: PKG_NAME_FROMRPM = $(shell echo "$(1)" | $(SED) -r -e 's/^([^-]+[A-Za-z-]?+)-.*$$/\1/')

The difference being that we use PKG_VER and PKG_REL as the delimiter in the sed expression. We capture everything up to that, including any numbers. Need to think about greediness for corner-cases.