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

Add package overwrite option #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jrjsmrtn
Copy link

@jrjsmrtn jrjsmrtn commented Dec 5, 2019

No description provided.

@codecov
Copy link

codecov bot commented Dec 5, 2019

Codecov Report

Merging #58 into master will increase coverage by 0.05%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #58      +/-   ##
==========================================
+ Coverage   90.64%   90.69%   +0.05%     
==========================================
  Files           1        1              
  Lines         171      172       +1     
  Branches       10       10              
==========================================
+ Hits          155      156       +1     
  Misses         16       16
Impacted Files Coverage Δ
upt_macports/upt_macports.py 90.69% <71.42%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 216634f...6b40111. Read the comment docs.

@jrjsmrtn
Copy link
Author

jrjsmrtn commented Dec 5, 2019

The https://framagit.org/upt/upt/merge_requests/4 pull request adds an --overwrite option to the upt command and a corresponding overwrite keyword argument to the package() function and backend.create_package() method signatures.

This allow to do a upt --recursive --overwrite and automatically overwrite package and dependencies in one operation.

This pull request adds overwrite support to the upt-macports backend.

@reneeotten
Copy link
Contributor

@jrjsmrtn this PR is less likely to fly... If there is already a Portfile present, the idea would be to update that one instead of simply overwriting it. We assume that maintainer has "perfected" the Portfile already and we do not necessarily want to replace that with an automatically generated file.

As you can imagine such "update" feature is a bit more complex and you can read some discussion about this in the relevant Issue/PR. There is a prototype by @Steap for the update feature here: https://github.com/Steap/upt-macports-update and -to be honest- is waiting for feedback and testing from me... Please feel free to give that a try!

@jrjsmrtn
Copy link
Author

jrjsmrtn commented Dec 6, 2019 via email

@reneeotten
Copy link
Contributor

@jrjsmrtn I see your point and you can certainly make such changes locally, but I am not sure if it will be added to upt (which isn't my call anyway).

Having said that, as a possible workaround without changing anything in upt: why don't you do the packaging in a directory that you just remove before the next round?

@Steap
Copy link
Collaborator

Steap commented Dec 15, 2019

Summary/description fields are fixed in upt, upt-rubygems and upt-macports.

Yes, this was in upt-rubygems 0.4 and upt 0.11.

Next in line: some Ruby licenses are not recognized and not explicitly reported

Can you tell me what packages have issues with licenses? My understanding is that people can write whatever they want in the "license" field, making it hard to properly guess what license is used.

my recursive build on bootsnap breaks with an InvalidSpecifier error

I fixed this in upt-rubygems 0.4.1, tell me whether it works for you :)

Regarding the "overwrite" feature, it is something I had in mind, and I'm not against adding it at some point, but two things should be kept in mind:

  1. It is going to be really easy to shoot yourself in the foot when using it with "--recursive"

  2. As Renee suggested, "rm -rf" (or using version control) could probably help with your use case. What do you think?

@Steap
Copy link
Collaborator

Steap commented Dec 16, 2019

Regarding the issues with licenses:

  1. I pushed a commit that adds a few licenses to spdx2macports.json (I meant to create a pull request through the "edit online" feature of Github, but it was automagically pushed since I got write rights on this repo, oops) e187980

  2. I tried packaging bootsnap and proposed a few patches upstream to improve license detection (see https://gist.github.com/Steap/ddff705d44283ea5fa39bc73b517615a)

@jrjsmrtn
Copy link
Author

jrjsmrtn commented Dec 16, 2019 via email

@Steap
Copy link
Collaborator

Steap commented Dec 16, 2019

All patterns are now parsed except for the four-digits version: it's not supported by RubyGemsFrontend._fix_twiddle_waka_expr() nor the semver module. I’m working on it right now and intend to submit a PR later this week.

I don't think the twiddle-wakka is supposed to work with anything else than Semver versions, to be honest :-/

@reneeotten
Copy link
Contributor

1. I pushed a commit that adds a few licenses to spdx2macports.json (I meant to create a pull request through the "edit online" feature of Github, but it was automagically pushed since I got write rights on this repo, oops) [e187980](https://github.com/macports/upt-macports/commit/e187980cd6c7d0b4ff732aa99e6e7fbd9bdf47ab)

No worries, but you broke the tests - please fix ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants