#20392: Feeds with Makefile in root directory fail
-------------------------+------------------------
 Reporter:  rlindeman@…  |      Owner:  developers
     Type:  defect       |     Status:  new
 Priority:  normal       |  Milestone:
Component:  packages     |    Version:  Trunk
 Keywords:               |
-------------------------+------------------------
 When adding a feed that contains a Makefile in the root directory the
 scripts/feeds update -a or -i command fails with the following error when
 creating the index file:
 /home/.../feeds/example.tmp/info/.files-packageinfo.mk:1: *** target
 pattern contains no `%'.  Stop.
 Create index file './feeds/example.index'

 Root cause:
 The $(FILELIST): rule found in the include/scan.mk file can't handle feeds
 where a Makefile appears in the root directory. This is due to how the sed
 portion of the rule strips off the entire directory portion of the file
 and fails to strip off the Makefile (because the first part of the sed
 command stripped off the preceding / character before the Makefile) and
 other content following.  The other content following the Makefile causes
 the TMP_DIR/info/.files-$(SCAN_TARGET).mk: rule to fail with the error
 message mentioned above because it attempts to use the extra content as
 arguments in the grep command.

 From what I can tell, this problem persists in the Trunk and at least as
 far back as AA (but is likely further back).

 Steps to reproduce:
 1. Create a (git,svn,link?) repository that contains a single Makefile in
 the root directory of the repository (suggest using the nano Makefile
 example)
 2. Add the new repository to the feeds.conf.default file of a newly cloned
 OpenWrt repository directory.
 3. Enter ./scripts/feeds update -a
 4. Observe the error message reported

 Workaround:
 Don't create feeds that contain OpenWrt Makefile's in the root directory

 Recommended solution(s):
 * Adjust scan.mk and feeds script files to cause the full path from TOPDIR
 to the Makefile to be stored in the .files-SCAN_TARGET.mk file. This is
 done by adding one PREFIX_DIR argument and removing most $(SCAN_DIR)/
 references (a few are replaced with PREFIX_DIR) (see attached files).

--
Ticket URL: <https://dev.openwrt.org/ticket/20392>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to