[Rpm-maint] [rpm-software-management/rpm] Checks for Obsoletes (#385)

Igor Gnatenko notifications at github.com
Thu Jan 25 20:31:20 UTC 2018


ignatenkobrain commented on this pull request.



> @@ -277,6 +277,21 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTagVal tagN,
 	if (checkDep(spec, N, EVR, &emsg))
 	    goto exit;
 
+	if (nametag == RPMTAG_OBSOLETENAME) {
+	    if (rpmCharCheck(spec, N, WHITELIST_NAME)) {
+		rasprintf(&emsg, _("Only package names are allowed in "
+				   "Obsoletes"));
+		goto exit;
+	    }
+	    if (!EVR) {
+		rasprintf(&emsg, _("It's not recommended to have "
+				   "unversioned Obsoletes"));
+	    } else if (Flags & RPMSENSE_GREATER) {
+		rasprintf(&emsg, _("It's not recommended to use "
+				   "'>' in Obsoletes"));
+	    }
+	}

yes, unless you use goto

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/385#discussion_r163959595
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20180125/296373f0/attachment.html>


More information about the Rpm-maint mailing list