Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dotnet-pkg.eclass und die NUGETS-Variable
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1924
Location: Schweiz

PostPosted: Fri Mar 08, 2024 9:44 am    Post subject: dotnet-pkg.eclass und die NUGETS-Variable Reply with quote

Ich würde gerne ein ebuild für ein in C# geschriebenes Package erstellen stoße dabei aber auf ein Problem wo mir auch eine Google-Suche alles andere als weiterhilft.

Wie in der Dokumentation von dotnet-pkg.eclass angegeben muss über die Variable "NUGETS" eine Liste aller benötigter Nugets definiert werden, was aber nicht in der Doku drin steht ist wie man an diese Liste kommen soll.
Ich habe es unter anderem mit "dotnet list package --include-transitive" versucht aber der Output davon ist einfach unbrauchbar (z. B. wegen doppelten Einträgen), sprich die Bereinigung dieser Liste würde Stunden dauern...

Kennt irgendjemand einen Trick oder ein Programm das einem eine brauchbare Liste generieren kann?

EDIT:
Bei Rust-Packages gibt es ja "dev-util/cargo-ebuild".
Das ist zwar auch nicht perfekt weil es alle Abhängigkeiten die direkt auf ein Git-Repo zeigen ignoriert aber damit kann man arbeiten.
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
firefly
Watchman
Watchman


Joined: 31 Oct 2002
Posts: 5189

PostPosted: Fri Mar 08, 2024 10:49 am    Post subject: Reply with quote

Schau dir doch mal beispiele an.
Hab auf die schnelle das hier gefunden:
https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-dotnet/dotnet-runtime-nugets/dotnet-runtime-nugets-7.0.16.ebuild
Quote:
NUGETS="
microsoft.aspnetcore.app.ref@${PV}
microsoft.aspnetcore.app.runtime.linux-arm@${PV}
microsoft.aspnetcore.app.runtime.linux-arm64@${PV}
microsoft.aspnetcore.app.runtime.linux-musl-arm@${PV}
microsoft.aspnetcore.app.runtime.linux-musl-arm64@${PV}
microsoft.aspnetcore.app.runtime.linux-musl-x64@${PV}
microsoft.aspnetcore.app.runtime.linux-x64@${PV}
microsoft.netcore.app.host.linux-arm@${PV}
microsoft.netcore.app.host.linux-arm64@${PV}
microsoft.netcore.app.host.linux-musl-arm@${PV}
microsoft.netcore.app.host.linux-musl-arm64@${PV}
microsoft.netcore.app.host.linux-musl-x64@${PV}
microsoft.netcore.app.host.linux-x64@${PV}
microsoft.netcore.app.ref@${PV}
microsoft.netcore.app.runtime.linux-arm@${PV}
microsoft.netcore.app.runtime.linux-arm64@${PV}
microsoft.netcore.app.runtime.linux-musl-arm@${PV}
microsoft.netcore.app.runtime.linux-musl-arm64@${PV}
microsoft.netcore.app.runtime.linux-musl-x64@${PV}
microsoft.netcore.app.runtime.linux-x64@${PV}
"

Da sollte es klarer werden wie es aussehen soll
_________________
Ein Ring, sie zu knechten, sie alle zu finden,
Ins Dunkel zu treiben und ewig zu binden
Im Lande Mordor, wo die Schatten drohn.
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1924
Location: Schweiz

PostPosted: Fri Mar 08, 2024 11:01 am    Post subject: Reply with quote

Wie die Liste am Ende aussehen soll weiß ich schon, nur wie ich mir eine aus dem Sourcen herausziehen soll weiß ich nicht.

Wenn man in der Ordner wo die Sourcen liegen reingeht und "dotnet list package --include-transitive" eingibt bekommt man zwar eine vollständige Liste aber die Arbeit diese aufzubereiten sprengt alles...
Hier mal ein Beispiel: https://drive.google.com/file/d/1zPHJJpprlLOd-UnXl9UK8d0n7DlDas2C/view?usp=sharing
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
firefly
Watchman
Watchman


Joined: 31 Oct 2002
Posts: 5189

PostPosted: Fri Mar 08, 2024 12:16 pm    Post subject: Reply with quote

nuget benötigt doch irgendwo eine liste der pakete.
Kann man nicht nicht diese quelle Nutzen? (AFAIK in den projekt dateien)
Und sicher das "dotnet list package" hier der passende command ist, wenn es um nuget pakete geht?
Sollte da nicht eher nuget genutzt werden?

EDIT:
auf der nuget webseite für ein paket gibt es auch eine anzeige wie das in den projekt config angegeben werden kann

z.b. https://www.nuget.org/packages/System.Xml.XDocument/
Der Tab "PackageReference"
Quote:
<PackageReference Include="System.Xml.XDocument" Version="4.3.0" />

Sollte es dann nicht einfacher sein nach dem "<PackageReference" Tag zu suchen?
Dadurch solltest du nur die nuget packages bekommen, welche du angeben musst und nicht noch die abhängigkeiten, welche du nicht angeben musst
_________________
Ein Ring, sie zu knechten, sie alle zu finden,
Ins Dunkel zu treiben und ewig zu binden
Im Lande Mordor, wo die Schatten drohn.
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1924
Location: Schweiz

PostPosted: Sun Mar 10, 2024 5:26 pm    Post subject: Reply with quote

@firefly
Also "dotnet nuget" wird so weit ich das verstehe nur benutzt um eigene Nugets zu erstellen und auf den Servern von Microsoft zu veröffentlichen. Und nach "PackageReference Include"zu suchen funktioniert nur bedingt, es fehlt dabei die benötigte Version und wenn es mehrere "*.csproj"-Dateien gibt wird genau so unübersichtlich.

Fürs erste gebe ich auf, vielleicht gibt es irgendwann ein Programm dafür.
Und das Package "games-emulation/ryujinx", welches der Grund ist warum ich daran versucht habe, hat vor kurzem wieder ein Update bekommen und ist daher offenbar doch noch nicht ganz tot.
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum