google / rpmpack

rpmpack (tar2rpm) - package rpms in pure golang or cli
Apache License 2.0
116 stars 32 forks source link

feat: add relation fields #22

Closed djgilcrease closed 5 years ago

djgilcrease commented 5 years ago

feat: add relation fields

caarlos0 commented 5 years ago

any news on this?

jarondl commented 5 years ago

@caarlos0

any news on this?

Yes, I was on vacation, so I had no time to review it yet. From a quick glance, it feels much better than the earlier version, but the internal API is still clunky. I feel like the AddToIndex function should accept the three tags instead of the "category". I will do a full review tomorrow.

Also, what does sense stand for? Is this a common term for specifying relationships between packages?

djgilcrease commented 5 years ago

Also, what does sense stand for? Is this a common term for specifying relationships between packages?

It is called sense in the rpm c code https://github.com/rpm-software-management/rpm/blob/master/build/parseReqs.c#L81 so I stuck with it

jarondl commented 5 years ago

There are still .String() methods. Is this intentional? do you disagree with my comments about their complexities? (That's fine, but let's discuss).

djgilcrease commented 5 years ago

There are still .String() methods. Is this intentional? do you disagree with my comments about their complexities? (That's fine, but let's discuss).

$ go build ./cmd/tar2rpm/...
# github.com/google/rpmpack/cmd/tar2rpm
cmd/tar2rpm/main.go:64:11: cannot use &provides (type *rpmpack.Relations) as type flag.Value in argument to flag.Var:
    *rpmpack.Relations does not implement flag.Value (missing String method)

The String function is required to be used as a flag value

caarlos0 commented 5 years ago

🚀