Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port detail: Add message for deleted ports #103

Merged
merged 1 commit into from
Sep 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions app/ports/templates/ports/portdetail.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,22 @@
{% endif %}
<!-- Obsolete port warning end-->

<!-- Deleted port warning start-->
{% if req_port.active is False %}
<div class="alert alert-danger" role="alert">
This port has been deleted. This page will exist till another port with the name "{{ req_port.name }}" comes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I support merging this immediately, but here's another somewhat weird suggestion / request for which I would like to get some feedback.

When someone is looking for a particular (deleted) port, there might be a great chance that this person actually wants to install the port that everyone else thought was useless, or at least broken beyond repair. Maybe that person is even wiling to look into fixing the old Portfile.

What we are missing in MacPorts is precisely the way to easily find old deleted ports, and to find reasons why they were deleted. We have almost all functionality in place now to allow us to store the commit shasum in which the port was deleted, so we could provide URL to the commit on github, which would hopefully include the commit message explaining why the port was deleted, potentially also showing the link to the pull request with the relevant discussion. And more importantly, it would be easy to see what the contents of the old port were.

What do you think about adding either an additional column (or maybe an additional table since the number of entries is expected to be relatively low) listing (port_name, commit, <timestamp?>) for deleted ports?

As an example the port maven-ant-tasks could link to macports/macports-ports@493ec90.

@cjones051073 @ryandesign @neverpanic

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, we probably need to remove View on GitHub link for such ports.

Copy link
Member Author

@arjunsalyan arjunsalyan Aug 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that it would be very easy to find the commit in which the port was deleted. We just get a list to changed paths. And it might become complex when one subport is deleted and one is updated- we won't be able to tell in which commit update took place and in which deletion. Please correct me, if I am missing something.

How about simply displaying a link to such a query:
https://github.com/search?q=maven-ant-tasks+delete+repo:macports/macports-ports&type=Commits

It is definitely not very reliable, but can at least give a direction.

into existence.</a>
</div>
{% endif %}
<!-- Deleted port warning end-->

<div class="rounded bg-light border border-secondary" style="padding: 8px">
<h4>{{ req_port.name }}</h4>
<p class="text-secondary">{{ req_port.description }}</p>
{% if req_port.active is True %}
<p class="float-right"><a class="btn-warning btn" href="https://github.com/macports/macports-ports/tree/master/{{ req_port.portdir }}/Portfile"
target="_blank">View on Github</a><br><br></p>
{% endif %}
<h5>Port Health:
{% for builder, latest_build in latest_builds.items %}
{% if latest_build %}
Expand Down