RFE: Makefile.common patch to error out when no spec is present

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings. 

I know some of you have run into this situation: 

If you have a package where there is no *.spec file present and you try
to run any of the fedora cvs Makefile.common targets, nothing happens
and the command just hangs. 

Turns out it's doing a grep of the spec file to figure out if the
package is noarch or not. When there is no spec file the grep hangs. 

Here's a very hacky patch that should at least error out in this case. 

Makefile hackers welcome to provide a better one. 

kevin
--
Index: Makefile.common
===================================================================
RCS file: /cvs/extras/common/Makefile.common,v
retrieving revision 1.127
diff -u -r1.127 Makefile.common
--- Makefile.common	15 Apr 2009 04:57:41 -0000	1.127
+++ Makefile.common	24 Apr 2009 21:15:03 -0000
@@ -35,6 +35,9 @@
 
 BUILD_FLAGS ?= $(KOJI_FLAGS)
 
+ifndef $(SPECFILE)
+SPECFILE = "NO_SPEC_FILE_FOUND"
+endif
 LOCALARCH := $(if $(shell grep -i '^BuildArch:.*noarch' $(SPECFILE)), noarch, $(shell uname -m))
 
 ## a base directory where we'll put as much temporary working stuff as we can

Attachment: signature.asc
Description: PGP signature

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux