#788 closed defect (fixed)
extract.sufx not set if you use both distfiles and use_bzip2
Reported by: | gwright@… | Owned by: | fkr@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 1.0 |
Keywords: | Cc: | ||
Port: |
Description
If you have to specify the distfile along with use_bzip2, the extract suffix is not set.
An example:
The port name is ghc The version is 6.0.1 The file to be fetched is ghc-6.0.1-src.tar.bz2
using
use_bzip2 distfiles ${name}-${version}-src${extract.sufx}
results in an attempt to fetch ghc-6.0.1-src.tar.gz. use_zip similarly fails in this case.
Attachments (2)
Change History (6)
comment:1 Changed 21 years ago by fkr@…
Owner: | changed from darwinports-bugs@… to fkr@… |
---|
Changed 21 years ago by tp62@…
Attachment: | patch-portfetch.2.tcl added |
---|
Correct patch for portfetch.tcl
comment:3 Changed 21 years ago by tp62@…
attachments.isobsolete: | 0 → 1 |
---|
comment:4 Changed 21 years ago by jkh@…
Resolution: | → fixed |
---|---|
Status: | new → closed |
Committed 2nd version of fix, looks good. Thanks!
Note: See
TracTickets for help on using
tickets.
Pretty self-explanatory - I define fix_extract_suffix as the handling procedure for use_bzip2 and use_zip. When they are 'set', I check and set extract.suffix as needed. Also, removed code from suffix procedure, which is now unnecessary. Diff:
--- portfetch.tcl-orig Wed Dec 10 16:58:22 2003 +++ portfetch.tcl Wed Dec 10 16:59:44 2003 @@ -70,18 +70,17 @@
-namespace eval options { } -proc options::use_bzip2 {args} {
-} +option_proc use_bzip2 fix_extract_suffix +option_proc use_zip fix_extract_suffix -proc options::use_zip {args} {
+proc fix_extract_suffix {name action} { + global extract.suffix use_bzip2 use_zip + if {[string equal ${action} "set"]} { + if {[tbool use_bzip2]} { + set extract.suffix .tar.bz2 + } elseif {[tbool use_zip]} { + set extract.suffix .zip + }
@@ -93,17 +92,11 @@
+ global extract.suffix fetch.type
+ return ${distname}${extract.suffix}