the build scriptlet doesn't take into account the source-subdir
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Triaged
|
Medium
|
Unassigned |
Bug Description
I have a source in a subdir, and want to build and install it using scriptlets. Even if I declare the source-subdir tag, the scriptlets will run from the build dir. I think it would make more sense to run the scriptlets from the subdir instead.
Take a look at this part:
freeimage:
source: http://
source-subdir: FreeImage
plugin: nil
build-packages: [g++]
build: |
cd FreeImage
make -j$(SNAPCRAFT_
install: |
mkdir -p $SNAPCRAFT_
cp FreeImage/Dist/* $SNAPCRAFT_
ln -s $SNAPCRAFT_
The subdir is FreeImage, and I still had to cd FreeImage during build, and during install I had to cp FreeImage/...
If we agree that the scriptlets should run from the subdir, a fix here is a little delicate because it will break the parts with subdir and scriptlets.
Yes, I agree.