Modify

Opened 2 years ago

#20392 new defect

Feeds with Makefile in root directory fail

Reported by: rlindeman@… Owned by: developers
Priority: normal Milestone:
Component: packages Version: Trunk
Keywords: Cc:

Description

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).

Attachments (2)

feeds (19.4 KB) - added by anonymous 2 years ago.
scan.mk (3.2 KB) - added by anonymous 2 years ago.
trunk version

Download all attachments as: .zip

Change History (2)

Changed 2 years ago by anonymous

Changed 2 years ago by anonymous

trunk version

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.