summaryrefslogtreecommitdiffstats
path: root/RPM4/src/RPM4.xs
diff options
context:
space:
mode:
Diffstat (limited to 'RPM4/src/RPM4.xs')
-rw-r--r--RPM4/src/RPM4.xs3
1 files changed, 2 insertions, 1 deletions
diff --git a/RPM4/src/RPM4.xs b/RPM4/src/RPM4.xs
index ca7b902..a2002ea 100644
--- a/RPM4/src/RPM4.xs
+++ b/RPM4/src/RPM4.xs
@@ -2655,7 +2655,8 @@ Spec_srcrpm(spec)
#else
header = spec->packages->header;
#endif
- int no_src = !headerIsEntry(header, RPMTAG_SOURCERPM);
+ struct rpmtd_s td;
+ int no_src = headerGet(header, RPMTAG_NOPATCH, &td, HEADERGET_MINMEM) || headerGet(header, RPMTAG_NOSOURCE, &td, HEADERGET_MINMEM);
char *nvr = headerGetAsString(header, RPMTAG_NVR);
mXPUSHs(newSVpvf("%s/%s.%ssrc.rpm",
rpmGetPath("%{_srcrpmdir}", NULL),