Pacman

Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.
Tasklist

FS#66541 - add option to "pick" files from one split package to another

Attached to Project: Pacman
Opened by nathan (ndowens) - Tuesday, 05 May 2020, 01:42 GMT
Last edited by Eli Schwartz (eschwartz) - Tuesday, 05 May 2020, 03:08 GMT
Task Type Feature Request
Category makepkg
Status Assigned
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version 5.2.1
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Wasn't sure which category to add this, if this belongs elsewhere please move.

I am wondering if the following function could become part of PKGBUILD/makepkg natively. I found it in another PKGBUILD and it is nice to use to allow split pkgs to move dirs/files easily into other package-*(){}
example say we want to move usr/share/docs into package_pkg-doc()
package() {
....
cd "$pkgdir"
pick docs usr/share/docs
}

package_pkg-doc() {
...
mv docs/* "$pkgdir"
}
pick() {
local p="$1" f d; shift
for f; do
d="$srcdir/$p/${f#$pkgdir/}"
mkdir -p "$(dirname "$d")"
mv "$f" "$d"
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
done
}
This task depends upon

Comment by Allan McRae (Allan) - Tuesday, 05 May 2020, 02:00 GMT
I'm sure there is another bug about this... but this is the approach that would be accpeted.

build() {
...
}

package() {
make DESTDIR=$pkgdir install
}

package_foo() {
filelist=(usr/share/docs/*)
}

package_bar() {
filelist=(usr/bin/*)
}

Followed by a warning for any files left over in the temporary area from the original package() function.
Comment by nathan (ndowens) - Tuesday, 05 May 2020, 03:05 GMT
@Allan Ah sorry if this is possibly a duplicate. The one that would be accepted looks nice. I look forward to this being implemented :D
Comment by Eli Schwartz (eschwartz) - Tuesday, 05 May 2020, 03:08 GMT
  • Field changed: Summary ([pacman] PKGBUILD → add option to "pick" files from one split package to another)
Useful description is useful.

Loading...