patchGNU Octave - Patches: patch #9880, pkg describe provides dependency...

 
 

patch #9880: pkg describe provides dependency information

Submitter:  Juan Pablo Carbajal <juanpi>
Submitted:  Fri 20 Dec 2019 06:10:28 AM UTC
   
 
Category:  Core : new feature Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  juanpi Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 03 Jan 2020 04:27:15 PM UTC, comment #5: 

@Juan: If you find examples where long strings of leading spaces are causing problems then we can re-insert the call to strtrim().  However, the best choice would be to track down the root cause.  Why are such weird strings being generated for the package name in the first place?

Rik <rik5>
Group administrator
Fri 03 Jan 2020 01:07:04 AM UTC, comment #4: 

Thanks for the improvements Rik,

I do have push permission so in the future if you want you can delegate the pushing.

Regarding strtrim: for some packages I was getting ill-formatted output due to long strings of leading spaces in the dependency names.
But it is not happening again, :?

Juan Pablo Carbajal <juanpi>
Group Member
Thu 02 Jan 2020 07:18:58 PM UTC, comment #3: 

This seems like a very useful addition to pkg.  I committed the patch here: https://hg.savannah.gnu.org/hgweb/octave/rev/c8a44a4e4fe7.

I made two small modifications.  First, I split the very long line that formats the package dependencies in to two lines of code for readability.


pkg_deps = cellfun (@(d) sprintf ("%s %s %s", struct2cell (d){:}), pkg_deps,
                    "UniformOutput", false);
pkg_deps = strjoin (pkg_deps, "\n\t");


Second, I removed an apparently unnecessary call to strtrim on the output of strjoin.

@Philip: "non-essential dependencies" might be an interesting feature.  I would file a Feature Request report about it, rather than continuing with this patch report.

Marking as Done and closing report.

Rik <rik5>
Group administrator
Wed 25 Dec 2019 07:00:56 PM UTC, comment #2: 

IMO it would also be desirable to mention suggested dependencies, maybe under the header "Non-essential dependencies" or so.

Philip Nienhuis <philipnienhuis>
Group Member
Fri 20 Dec 2019 10:39:00 AM UTC, comment #1: 

Good idea!

Philip Nienhuis <philipnienhuis>
Group Member
Fri 20 Dec 2019 06:10:28 AM UTC, original submission:  

Currently


pkg describe pkgname


does not provide dependency information of the package.

This patch adds this feature. If there are no objections I can push it to the default branch.

Juan Pablo Carbajal <juanpi>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by juanpi (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-01-02 rik5 StatusReady For Test Done
        Open/ClosedOpen Closed
    2019-12-20 juanpi Attached File- Added pkg_describe_dependency.diff, #48096

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code