CRUX

Welcome to CRUX bug tracking.
Tasklist

FS#1384 - pkgmk - save sources into PKGMK_SOURCE_DIR/name

Attached to Project: CRUX
Opened by Fun (fun) - Tuesday, 28 February 2017, 02:37 GMT
Last edited by Fredrik Rinnestam (frinnst) - Friday, 16 June 2017, 15:39 GMT
Task Type Improvement
Category tools → pkgutils
Status Closed
Assigned To No-one
Operating System CRUX
Severity Low
Priority Normal
Reported Version 3.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Patch attached.

The sourceless ports already use a subfolder.
This task depends upon

Closed by  Fredrik Rinnestam (frinnst)
Friday, 16 June 2017, 15:39 GMT
Reason for closing:  Deferred
Comment by Fun (fun) - Tuesday, 28 February 2017, 03:09 GMT
Add a patch to use the PKGMK_SOURCE_DIR as a source for others to mirror from (like crux.nu/distfiles)
It will try to get the source from $mirror/$source and $mirror/$name/$source from every mirror.
Comment by Fredrik Rinnestam (frinnst) - Tuesday, 28 February 2017, 11:02 GMT
Can you justify why this would be an improvement rather than your personal preference? Most folks already set $PKGMK_SOURCE_DIR to something specific anyways.
Comment by Juergen Daubert (jue) - Tuesday, 28 February 2017, 11:44 GMT
IMO it's not a good idea to hard code PKGMK_SOURCE_DIR in the suggested way. Much better would be to allow the user to use something like 'PKGMK_SOURCE_DIR=<whatever>/$name' in pkgmk.conf.

Currently this will not work because pkgmk cannot create missing directories.

Alan Mizrahi wrote a patch which adds exactly this feature to pkgmk, see mailing list archive.
Comment by Juergen Daubert (jue) - Tuesday, 28 February 2017, 12:03 GMT
Alan's patch with several changes to pkgmk, including the 'create_directory'-feature, is here:

http://www.mizrahi.com.ve/crux/ports/pkgutils/0001-New-features-and-small-improvements-in-pkgmk.patch
Comment by Fun (fun) - Tuesday, 28 February 2017, 14:11 GMT
I've found #923. Sorry.
You can close this as dup, link to that or something. I'll add my view there.
But you understand that is an recurring issue, which is annoying to users, who turn to devs ... and is better to be sorted out.
Comment by Juergen Daubert (jue) - Tuesday, 28 February 2017, 19:17 GMT
If we have a clean patch for the 'create_directory' feature alone, we're not reluctant to think again about it.
Comment by Fun (fun) - Tuesday, 28 February 2017, 19:32 GMT
I've attached the patch, extracted from (http://www.mizrahi.com.ve/crux/ports/pkgutils/0001-New-features-and-small-improvements-in-pkgmk.patch), with default 'yes' :D
I'll use this pkgmk a couple of days to see if is OK.
Comment by Fun (fun) - Wednesday, 01 March 2017, 22:16 GMT
This is the same patch with default to no.
No problems so far.

Comment by Fun (fun) - Sunday, 05 March 2017, 15:52 GMT
This patch can create problems if you are downloading sources with different users.

For example, sudo pkgmk -d will create /usr/ports/src/X/ver1.tar.gz with /usr/ports/src/X owned by root:root.

If, later you use prt-get (configured to use fakeroot --user=pkgmk) if will fail creating /usr/ports/src/X/ver2.tar.gz.

Loading...