New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #34931 (new enhancement)

Opened 11 months ago

Last modified 2 months ago

Add "new" to port command

Reported by: david.w.watson@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.1.1
Keywords: Cc: egall@…
Port:

Description

Would it be possible to add "new" to the port command so that we could see new additions the the repository?

Change History

comment:1 Changed 11 months ago by ryandesign@…

  • Component changed from ports to base
  • Type changed from request to enhancement

New since when? :)

comment:2 Changed 11 months ago by david.w.watson@…

I was just wondering if there was some way to get a list of new ports as they are included in the repository, perhaps listed by date.

comment:3 Changed 10 months ago by ryandesign@…

No, I'm afraid there isn't any such feature at this time.

You can view the repository log but of course it'll show you every change, not just those that result in a new port being added.

As I was trying to ask above, it's not clear how a command like "port new" would work. How many new ports would it show you? Ten? The past week's worth? A month? Since you last ran the command? Since the beginning of time?

Even if we had answers to the above, I'm not sure how we'd implement it. I don't think that the PortIndex stores the date when a port was first added to the index. And of course the PortIndex can be completely deleted and recreated; how would such a re-created index know when each port came into existence? And if it's not in the PortIndex, then MacPorts doesn't know it.

This might be a candidate for a contrib script. If somehow given a range of dates, it could pull the Subversion log as above, and filter it to get only newly added Portfiles. The port-whatsnew script (which shows you the log of what's changed in a particular port since you installed it) might be a starting point. This would help you find newly added ports, but not new subports added to existing ports; to find new subports, a much more sophisticated algorithm would have to be used, which would probably have to download and look into the source code of each modified Portfile, which would probably make it prohibitively expensive in terms of bandwidth and CPU time.

comment:4 Changed 3 months ago by egall@…

  • Cc egall@… added

Cc Me!

comment:5 follow-up: ↓ 6 Changed 3 months ago by egall@…

When you run port -d selfupdate, it contains some output like this:

Creating port index in /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports
Adding port perl/p5-extutils-f77
Adding subport p5.8-extutils-f77
Adding subport p5.10-extutils-f77
Adding subport p5.12-extutils-f77
Adding subport p5.14-extutils-f77
Adding subport p5.16-extutils-f77
Adding port python/py-netcdf4
Adding subport py26-netcdf4
Adding subport py27-netcdf4

Total number of ports parsed:	9 
Ports successfully parsed:	9 
Ports failed:			0 
Up-to-date ports skipped:	16561

These are all the ports that are new since the last time you ran port -d selfupdate. Perhaps a port new command could simply re-display this info?

comment:6 in reply to: ↑ 5 ; follow-up: ↓ 7 Changed 3 months ago by larryv@…

Doesn’t answer Ryan’s question.

As I was trying to ask above, it's not clear how a command like "port new" would work. How many new ports would it show you? Ten? The past week's worth? A month? Since you last ran the command? Since the beginning of time?

“Since the last selfupdate” is kind of arbitrary. And the output of port -d selfupdate includes all changed ports, not just new ones.

comment:7 in reply to: ↑ 6 ; follow-up: ↓ 8 Changed 2 months ago by egall@…

Replying to larryv@…:

“Since the last selfupdate” is kind of arbitrary.

So would any unit of time we choose. With this one at least there's already a list that we could easily echo.

comment:8 in reply to: ↑ 7 ; follow-up: ↓ 9 Changed 2 months ago by larryv@…

Replying to egall@…:

So would any unit of time we choose.

Correct. Which is why I don’t think we should provide any sort of “new ports” functionality at all.

comment:9 in reply to: ↑ 8 Changed 2 months ago by egall@…

Replying to larryv@…:

Replying to egall@…:

So would any unit of time we choose.

Correct. Which is why I don’t think we should provide any sort of “new ports” functionality at all.

idk, I'd say that having even an arbitrarily-lengthed "new ports" feature would still be more useful than not having any such feature at all (as long as we make the user aware what the length of time is, and that said length is arbitrary)... I suppose that's a matter of opinion though.

Last edited 2 months ago by egall@… (previous) (diff)
Note: See TracTickets for help on using tickets.