opnsense / update

OPNsense update tools
https://opnsense.org/
BSD 2-Clause "Simplified" License
128 stars 78 forks source link

remove patches: opnsense-patch gives rather ambiguous status messages #55

Closed MrM40 closed 5 years ago

MrM40 commented 5 years ago

Describe the bug When "reapplying" a patch to remove it I got this message:

#opnsense-patch 459da410ebf
Found local copy of 459da410ebf, skipping fetch.
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|From 459da410ebf9bed406222ebb2b4233950ad8315b Mon Sep 17 00:00:00 2001
|From: Ad Schellevis <ad@opnsense.org>
|Date: Sun, 2 Jun 2019 10:51:50 +0200
|Subject: [PATCH] update copyright in previous while here.
|
|---
| src/opnsense/site-python/watchers/dhcpd.py | 2 +-
| 1 file changed, 1 insertion(+), 1 deletion(-)
|
|diff --git a/src/opnsense/site-python/watchers/dhcpd.py b/src/opnsense/site-python/watchers/dhcpd.py
|index 8ebfc10a55..92e22a5a34 100644
|--- a/src/opnsense/site-python/watchers/dhcpd.py
|+++ b/src/opnsense/site-python/watchers/dhcpd.py
--------------------------
Patching file opnsense/site-python/watchers/dhcpd.py using Plan A...
Reversed (or previously applied) patch detected!  Assuming -R.Hunk opnsense/core#1 succeeded at 1.
done
All patches have been applied successfully.  Have a nice day.

I don't understand the 3rd last line: Reversed (or previously applied) patch detected! Assuming -R.Hunk opnsense/core#1 succeeded at 39. 1: For me it says a path, which was already reversed, was detected. Not that it was reversed/removed right now, which I assume is the case?. 2: According to the manual the option -R doesn't exist?

It is very unclear to me if the path was reversed/removed?

Additional info: I have applied two patches and want to remove them before doing an update. This is the result of the -l option:

40bd0c5dc82 dhcpd leases watcher, file rotation issue. closes
459da410ebf update copyright in previous while here.

Will option -e just remove the patches from the local repository or also reverse/remove them?

Environment OPNsense 19.1.8 (amd64/OpenSSL)

fichtner commented 5 years ago

opnsense-patch has a manual page. And I am not going to support base utility patch(1) output reading or ambiguity.

MrM40 commented 5 years ago

I did read the manual and it didn't inlighing me in regards to the above issues. E.g there are not "-R" option in the manual. But I understand you have to prioritize.

fichtner commented 5 years ago

Look, there's nothing to "prioritise". man patch:

Screenshot 2019-09-01 at 10 24 39 AM

-e is explained. It deletes all of the locally cached patch files. It does not unpatch your system...

Screenshot 2019-09-01 at 10 27 11 AM

None of these things are operationally relevant.

MrM40 commented 5 years ago

Oh, I didn't know it was a native freebsd tool (patch), I was reading the manual for "opnsense-patch"...got it!