Skip to contentSkip to conversation

builddeb: fix errors caused by objtree redefinition

PATCH In review Darrick J. Wong 2 participants 3 messages Jun 19, 2014 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 builddeb: fix errors caused by objtree redefinition

In commit 7e1c04779efd51154baf652e653ceb24ce68939b ("kbuild: Use relative path for $(objtree)"), objtree was redefined from whatever $(CURDIR) is to a simple ".". Unfortunately, this breaks builddeb, which was relying on $objtree to be an absolute path, not a relative one. Since the script is run from the object directory, pick up a more absolute value for objtree where it's needed.

---
 scripts/package/builddeb |    1 +
 1 file changed, 1 insertion(+)
scripts/package/builddeb +1 -0
index 2f3ec77..ce7d05b 100644
@@ -299,6 +299,7 @@ EOF
 fi
 
 # Build header package
+objtree="$(pwd)"
 (cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles")
 (cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles")
 (cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles")
#1 lore raw
Quoted 11 lines · Darrick J. Wong

In commit 7e1c04779efd51154baf652e653ceb24ce68939b ("kbuild: Use relative path for $(objtree)"), objtree was redefined from whatever $(CURDIR) is to a simple ".". Unfortunately, this breaks builddeb, which was relying on $objtree to be an absolute path, not a relative one. Since the script is run from the object directory, pick up a more absolute value for objtree where it's needed.

---
 scripts/package/builddeb |    1 +
 1 file changed, 1 insertion(+)

Hi Darrick,

thanks for the patch. Can you check if commit a765a7ce from linux-next also fixes your issue? This is on its way to Linus.

Thanks,
Michal

#2 lore raw
Quoted 13 lines · Michal Marek
Quoted 11 lines · Darrick J. Wong

In commit 7e1c04779efd51154baf652e653ceb24ce68939b ("kbuild: Use relative path for $(objtree)"), objtree was redefined from whatever $(CURDIR) is to a simple ".". Unfortunately, this breaks builddeb, which was relying on $objtree to be an absolute path, not a relative one. Since the script is run from the object directory, pick up a more absolute value for objtree where it's needed.

---
 scripts/package/builddeb |    1 +
 1 file changed, 1 insertion(+)
Quoted 4 lines

Hi Darrick,

thanks for the patch. Can you check if commit a765a7ce from linux-next also fixes your issue? This is on its way to Linus.

Looks good! You can add my Tested-by if you like.

--D

Quoted 3 lines

Thanks,
Michal