Opened 12 years ago

Last modified 11 years ago

#34931 new enhancement

Add "new" to port command

Reported by: watsodw Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.1.1
Keywords: Cc: cooljeanius (Eric Gallager)
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 (9)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Component: portsbase
Type: requestenhancement

New since when? :)

comment:2 Changed 12 years ago by watsodw

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 12 years ago by ryandesign (Ryan Carsten Schmidt)

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 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:5 Changed 11 years ago by cooljeanius (Eric Gallager)

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 ; Changed 11 years ago by larryv (Lawrence Velázquez)

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 ; Changed 11 years ago by cooljeanius (Eric Gallager)

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 ; Changed 11 years ago by larryv (Lawrence Velázquez)

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 11 years ago by cooljeanius (Eric Gallager)

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 11 years ago by cooljeanius (Eric Gallager) (previous) (diff)
Note: See TracTickets for help on using tickets.